Introduction
Within Vodafone router wifi LAN, ASUS laptop server gets 4 types of data using 3 threads from client RaspberryPi2. RaspberryPi2 gets its 4 data:
- Time from network
- Forward-back count from GPIO 2 pushbuttons
- Potentiometer and
- Thermometer from SPI interface
SPI interface is wired to Microchip Pic24 which converts 3 and 4 with its A/D.
Layout of devices.
![Image 1](/KB/connected-devices/1092291/LayoutARM.png)
Wired devices.
![Image 2](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
etc/network/interfaces for Raspberry. If you use DHCP instead of static like here, you are completely free to start applications with any useful IP.
![Image 3](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Example:
Microchip Pic24 must be loaded with its own .hex file.
Vodafone router IP: 192.168.1.1 Laptop ASUS IP: 192.168.1.2 RaspberryPi2 IP: 192.168.1.44 TCP/IP port 2589 or many other thousands
Run YOURdirectory\AsAm.exe 192.168.1.2 2589
![Image 4](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Now AsAm is started. If you push Communicate AsAm will wait 50 s and then you can only close it with x syscommand. Within 50 s get after Raspberry.
![Image 5](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
For Raspberry, from PuTTY, within dir of RaSig, run: sudo ./RaSig 192.168.1.2 2589. If everything is right, you get communication: it can last hours. If Raspberry can't communicate, it will close within 30 s.
![Image 6](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Pushing Abate will stop communication. You can restart without closing AsAm app.
![Image 7](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Background
Setting up SPI interface for Raspberry; knowledge of Microchip 16bit microcontroller.
LM 35 is the thermometer. One pushbutton is forward, the other is back counter.
I use VisualGDB for RaspberryPi2. MakeFile Settings include libraries: pthread wiringPi.
I use MPLAB X IDE and MicrostickII for Pic24.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.