Examples
Hello World
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
This example uses UART4 in the MCU which is reserved for the USB UART communication. A simple string is printed on the console and then the device restarts after 10 seconds of countdown. Use 115200 baudrate.
LED
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
A simple blinking LED example intended for the Open IoT Gateway. Lighting LED will be changed every 1 second from LED1 to LED5.
Switch
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
Simple tactile switch example intended for the Open IoT Gateway. After flash, connect device to a PC and open port in Console Terminal. The information about the switch pressed state will be displayed in the console as shown below.
RS232/RS485
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
This script tests internal communication between serial ports with the possible lowest (2400) and highest (115200) baudrate.
For this example, connect each port's transceiver with the receiver:
Default settings:
- baud rate: 115200
- data bits: 8
- parity bits: 0
- stop bits: 1
- receiver timeout: 3s
If the connection is right, you should see the messages shown below for each U(S)ART:
If something goes wrong with the connection, you will see the message for a specific port like below:
Ethernet
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
This example allows you to check the Gateway's IP address. Connect the device via USB/UART converter and choose correct COM/ttyUSB port. Remember to connect the IoT Gateway to the network using an Ethernet cable. Type in terminal "ipconfig". If your network connection works properly, IP address will be displayed as below:
I2C scanner
STM32 Open IoT and IIoT Gateways (P10 - P12)
Link to repositories:
A simple program for scanning and displaying addresses of connected devices via I2C bus.