-
Notifications
You must be signed in to change notification settings - Fork 10
ExamplePrograms
Yutaka Matsubara edited this page Jul 6, 2016
·
1 revision
- Connect your GR-PEACH to your PC by Micro USB cable.
- Push the RESET button.
- You can see the blinking RGB LED.
- Connect your GR-PEACH to your PC by Micro USB cable.
- Connect your GR-PEACH and your PC by using an Ethernet cable.
- Push the RESET button.
- You can find the IP address assigned to your GR-PEACH in the serial output, check the serial output.
- Access the IP address (e.x. http://192.168.2.30/web_top.htm) by your web browser.
- Connect your GR-PEACH to your PC by Micro USB cable.
- Push the RESET button.
- You can see the blinking RGB LED.
- As you know, Arduino provides simple setup-loop programming style. The setup() is called at once when the program starts. After the function, loop() is called.
- In this example, multiple loop functions can be defined such like loop1(), loop2(), ... , and loop5() in addition to loop().
- You should specify the number of additional loops you use by 'ADDITIONAL_LOOP_NUM' macro defined in arduino_app.h.
- For example, '#define LOOP_NUM 2' means that you need to define loop1() and loop2() in the cpp file.
- Note that you don't need to add CRE_TSK, which is static API to create a task, in multitask_arduino.cfg because they are defined in ./mbed-lib/arduino-lib/core/arduino_main.cfg.
- In the default, every loop functions including loop() have the same priority (LOOP_PRI = 5).
- If you expect that every loop functions run concurrently, use a cyclic handler and irot_rdq() service call as used in this sample.
- For more detail specification, refer the specification of TOPPERS/ASP kernel.
- Check the device name of the serial port by 'ls /dev/tty.usbmodem'.
- If the name is tty.usbmodem1412, you can see serial output by the following command.
$ screen /dev/tty.usbmodem1412 115200
- to exit the screen, type Ctrl A+K.