1*** Variables ***
2${UART}                       sysbus.usart2
3${URI}                        @https://dl.antmicro.com/projects/renode
4
5${MB85RC1MT}=     SEPARATOR=
6...  """                                         ${\n}
7...  using "platforms/cpus/stm32l072.repl"       ${\n}
8...  sht45: I2C.SHT45 @ i2c1 0x44                ${\n}
9...  """
10
11*** Keywords ***
12Create Machine
13    Execute Command          mach create
14    Execute Command          machine LoadPlatformDescriptionFromString ${MB85RC1MT}
15    Execute Command          sysbus LoadELF ${URI}/b_l072z_lrwan1--zephyr-sht45_test.elf-s_638824-bf5a9a77e45b638ca49d5fc51fa0bc6f19435b35
16
17*** Test Cases ***
18Should Read Measurements And Serial Number
19    Create Machine
20    Create Terminal Tester    ${UART}
21    Execute Command           showAnalyzer ${UART}
22
23    Execute Command           sysbus.i2c1.sht45 Temperature 25
24    Execute Command           sysbus.i2c1.sht45 Humidity 60
25    Execute Command           sysbus.i2c1.sht45 SerialNumber 0xf0e0d0c0
26
27    Wait For Line On Uart     temperature: 25.0
28    Wait For Line On Uart     humidity: 59.999069
29    Wait For Line On Uart     serial number: f0e0d0c0
30