How to attach sensor from arduino to python-thing


#1

I started a question on github. That led me to rethink my plan of having a webthing-arduino on a Yun.

Regarding the fact that i was able to make a webthing-python but have my sensordata on the Arduino side i need some advise on how to bypass the sensordata and switchstates to the webthing-python.

The bridge between Arduino and Linux is a serial RX/TX that can be adressed through the bridge library.
BridgeBlockDiag
There are many functions available to use with the bridge and im not shure whats the right way to go.

Should i write a json file in Linux and update the states in it or a file for every state or let python listen to virtual GPIO or even implement a RPC? Im not sure what is the best and i wold like to know what path you wold takeā€¦

@hobinjk, @freaktechnik, @benfrancis, and everybody who likes to participateā€¦

Thanks a lot.


#2

i found a way working for this part. Its pyduino. I followed this tutorial quite strict. What took me a lot of time is to find out the serial port of my connection between Arduino and Python/Linux. In my case it was Serial1 on Arduino side and ttyS0 as im using a Yun derivate. If your strugling you can find a more compact version here ist for that exact board but you can use it on any other by inserting the correct Serial and ttyXY.