This NuttX sample demonstrates the access of keys KEY1-KEY5. When the program is executed, the keys are scanned and the pressed key is displayed on the console.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates the use of secondary serial port. When the program is executed, a welcome message is sent through this port which can be seen at the terminal program running on the host. Also any message typed at the host side is received through this port and printed on the target board’s console.
picocom
with 115200 baudrate, 8 data bits,
no parity, 1 stop bit, using the following command. When done, use
Ctrl-A Ctrl-X
to exit picocom
.
$ picocom -b 115200 /dev/ttyUSB0
The welcome message will be displayed on the RS232 port. Any message sent through the RS232 port will be read by the board and displayed on its terminal console i.e the port corresponding to the Mini-B cable.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates I²C usage. The sample was tested using NXP’s PCF8591 8-bit A/D and D/A converter. When the program is executed, the value at the ADC Channel 0 is continously displayed on the console.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates SPI usage. The program was tested using a SPI interfaced Seven-segment display. When the program was executed, the seven-segment display shows Hex values from 0x00 to 0xFF with a delay of 1 second.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates ADC usage. The sample simply prints the value of the voltage at the ADC Channel. When the program is executed, the samples from the ADC Channels are continously displayed on the console.
Download: For Windows, For GNU/Linux
This sample demonstrates DAC usage. An LED is connected to external connector pins AIN3 and GND with a series resistor of 1k. When the program is executed, the 1Hz square wave generated drives the LED.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates the use of CAN. When the program is excecuted, the data sent from CAN Port 1 to CAN port 2 is looped back and read from CAN Port 1. All these CAN messages are displayed on the terminal console.
Open picocom
, and specify 115200 baudrate, 8 data bits, no parity, 1 stop bit, using the following command. When done, use Ctrl-A Ctrl-X
to exit picocom
.
$ picocom -b 115200 /dev/ttyUSB0
The CAN messages will be displayed on the console.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates the use of ethernet. The board is a client which connects to a server through a TCP connection. The client receives the message sent by the server and displays it on the console.
Add sample text to the file:
$ echo "Hello! Welcome to Zilogic Systems" > hello.txt
Install the netcat package and use the following command to send message to the client:
$ nc -l -p 5471 < hello.txt
Install the netcat package for windows and use the following command to send the message from the DOS-prompt:
$ nc -l -p 5471 < hello.txt
In case of any connectivity problems, try disabling the firewall on your host machine.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates the usage of USB. The program demonstrates the emulation of USB as a serial device. When the program is executed, a welcome message is sent to the USB port. This message can be seen by opening the corresponding terminal on host machine.
Open picocom
, and specify 115200 baudrate, 8 data bits, no parity,
1 stop bit, using the following command. When done, use Ctrl-A Ctrl-X
to exit picocom
.
$ picocom -b 115200 /dev/ttyUSB0
The welcome message should get displayed after opening the port.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates EEPROM usage. The sample implements a reboot counter. The reboot count is stored in location 0 of the EEPROM. When the board is reset (soft or hard), the reboot count is read from the EEPROM, incremented and written back to the EEPROM. The reboot count is displayed on the terminal console.
Download: For Windows, For GNU/Linux
This NuttX sample demonstrates SD-card usage. When the program is executed, it reads the contents of the file specified in the program and displays its contents on the console.
Power up the board, and open picocom
, and specify 115200 baudrate,
8 data bits, no parity, 1 stop bit, using the following command. When
done, use Ctrl-A Ctrl-X
to exit picocom
.
$ picocom -b 115200 /dev/ttyUSB0
The contents of the file test.txt will be displayed in the console.
Download: For Windows, For GNU/Linux