Expert needed RasPi project I2C, GPIO issues


#1

Hi dear friends, thank you for your kind attention and support.
I'm involved into a project-domotic system, for this project I developer an hardware board connected to I2C bus and some buttons to GPIO, since now I tried to merge RaspiArduino with the Raspbian but I had some difficulties:

  1. when RaspiArduino uses I2C bus it looks it keep it busy, so Raspbian can't for example communicate with RTC more. Unfortunately I didn't find a way to release the bus for a while, for example with command "wire.end();", but seems not.
  2. I was thinking to develope all automation with RaspiArduino cause I know enough Arduino IDE and its language, puls take advance of libraries there, start the result .bin file as service and communicate with it by mqtt. But the mqtt working library I found sometimes loose packets, not reliable.

For these reasons I'm loooking for a platform like Node Red where I can directly drive I2C, in this case I hope:
a) I will be sure that system can communicate anytime with RTC and eve if power goes off and internet is disconnected the clock will keep the right time
b) I won't need mqtt and I can manage the hardware from Nore Red. Is it possible?

c) Is is possible to write automation scripts inside Node Red to manage the hardware? In which language?
d) does anyhow supports arfuino libraries to manage the I2C hardware?

Thank you a lot for your kind help!


#2

Can someone please give me any suggestions?
Thank you


#3

Did you check on flows.nodered.org ? - there is this set of nodes -
https://flows.nodered.org/node/node-red-contrib-i2c
that may help. (I've not used them though so can't comment further). - or the node-red-contrib-gpio nodes also do some i2c also.

Node-RED uses javascript under to add things in the function node - but you can do lot with the pre-built nodes without needing to write code.