Click here to Skip to main content
13,864,346 members
Click here to Skip to main content
Add your own
alternative version


2 bookmarked
Posted 13 Apr 2016
Licenced CPOL

Getting Transducers Over LAN

, 13 Apr 2016
Rate this:
Please Sign up or sign in to vote.
Within LAN, laptop gets signals from microcomputer and microcontroller using TCP/IP and SPI


Within Vodafone router wifi LAN, ASUS laptop server gets 4 types of data using 3 threads from client RaspberryPi2. RaspberryPi2 gets its 4 data:

  1. Time from network
  2. Forward-back count from GPIO 2 pushbuttons
  3. Potentiometer and
  4. Thermometer from SPI interface

SPI interface is wired to Microchip Pic24 which converts 3 and 4 with its A/D.

Layout of devices.

Wired devices.

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.


Microchip Pic24 must be loaded with its own .hex file.

Vodafone router IP:                              Laptop ASUS IP:                        RaspberryPi2 IP:                            TCP/IP port 2589 or many other thousands

Run YOURdirectory\AsAm.exe 2589

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.

For Raspberry, from PuTTY, within dir of RaSig, run: sudo ./RaSig 2589. If everything is right, you get communication: it can last hours. If Raspberry can't communicate, it will close within 30 s.

Pushing Abate will stop communication. You can restart without closing AsAm app.


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 article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190214.1 | Last Updated 13 Apr 2016
Article Copyright 2016 by Member 11246861
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid