Good evening ChiliPeppr Community,

Good evening ChiliPeppr Community,

I am attempting to use an Arduino Uno to send commands to my rpi3/serial-port-json server and then to my TinyG. I would like to send simple commands like feedhold and cycle-start using buttons on my control box.

I have been able to control outputs on my arduino from the chilipeppr workspace but am not sure how to send commands the opposite direction. I have tried using serial.print() but am not sure if the message needs to be json or if this is even the right method.

Is this possible?

Why not just watch the gpio on the rpi3 directly? Why do you need the Arduino? That feels overkill. Also for talking to spjs from rpi you should do a script that talks websockets to spjs. Have you tried that?

Hey @jlauer , that’s a great point. That is actually what I tried first and kept getting this error after installing and running the gpio-json-server on the rpi:
missing/deleted image from Google+

I think there are other great tools on rpi that I would use instead to monitor gpio and talk to spjs. I’d use node.js. The node npm package rpi-gpio lets you talk to the gpio ports from node. Node then also natively supports websockets, which is how you talk to spjs. So just glue it all together with a small node.js project. If spjs is running on the rpi then you would just connect to the websocket of ws://localhost:8989

Hey @jlauer , forgot that I installed WiringPi with ShuttleCP and that it already has a script to handle pin state changes for the GPIOs on the pi. Got it working now. Thanks for the input!