Saturday, November 25, 2017

Blinky on Raspberry Pi

Test Environment and other requirements
  • Used mobile phone to create a network with 2 nodes. Interesting since no longer just using localhost.
  • ipconfig (windows) and ifconfig (raspbian)  identified the net ip address to use for the respective devices.
  • GPIO pin #s are used as expected like other SysFs RPi examples
  • Start forte on the Raspberry Pi as follows. It requires sudo to work and of course the ip addr:port as input
    • cd to directory with the forte executable:
    • sudo ./forte -c :61499
  • When using Publish and Subscribe use multicast IP addresses with unique ports.
    • See  FBDK/IP in 4diac documentation for more details.

Test Apps
Needed to use step-wise refinement to be sure the parts worked.
App1: LEDon Turn RPi led on
Tested: (RPI only)
*if the communication from 4diac-IDE to RPi worked
*if pin numbering is GPIO numbering
*simple sysFS communication test
App2: LEDauto : Blink RPi led
Tested:  (RPI only) Using sysFS more
App3ALEDstart_Stop:  (added RPI > status to PC) Blink RPi led and reflect in FBRT WINDOW via BOOL_OUT with a PC "led" 
Tested: Publish / Subscribe to PC from RPi
App3B: LEDstart_Stop:  (added PC control of RPi) Via Start and Stop buttons on PC in a FBRT_WINDOW control starting and stopping the blinking of the RPI led and the PC "led" to reflect RPi activity 
Tested: Publish / Subscribe to RPi from PC  to control RPi

No comments:

Post a Comment