RP6 ROBOT SYSTEM - 5. Example Programs
The text message transmits all I/O port statuses, all measurement values of the ADC
channels and all stopwatch counter values. In addition to that a few 16 bit counter
values in decimal and binary format (i.e. 16 ASCII characters are displayed – although
2 bytes would be sufficient – or alternatively 4 characters in hexadecimal format. As
already said, not really efficient, just to increase the message size).
Example 4: microSD card
Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_04_SDCARD\
File: RP6M256_04_SDCARD.c
The program generates outputs on the serial interface, the WLAN connection and
on the LCD!
A suitable microSD card should be inserted into the card slot!
The robot does NOT move in this example program!
This program displays the contents of the test text file that should have already been
stored in the main directory of the microSD card for the selftest program. It checks if
a certain part of the text is read properly.
If it is not there already, please copy the file M256_SELFTEST_TESTFILE.txt from the
example directory onto a suitable microSD card. You can then insert the microSD card
in the card slot of the RP6-M256. The robot must be turned off when you do that!
Then turn the robot on, upload and start the program. Some information about the SD
card will be retrieved and then the contents of the text file will be displayed on the
serial interface and per WLAN.
Example 5: WLAN commands
Directory: <RP6Examples>\RP6_M256_WIFI_EXAMPLES\Example_05_WLAN_CMD\
File: RP6M256_WLAN_CMD.c
The program generates outputs on the serial interface, the WLAN connection and
on the LCD!
The robot does NOT move in this example program!
In some applications, it might be necessary to send commands to the WLAN module
or to request some status information such as the current signal strength.
It is also possible to use various client applications for different protocols that are con-
tained in the module firmware (HTTP Client, FTP Client...), but this is not described in
detail in this manual. You will find further information on this subject in the document-
ation of the WLAN module.
This example program periodically triggers a scan for access points within range and
displays the results on the serial and on the WLAN connection.
- 44 -