I'm having trouble with trying to get node-red to run my Python code and using I2C nodes on node-red.
I used the following nodes so far, yet none of them work on my end for reasons explained below.
I tested my python code on the terminal before trying to run it in node-red. If I run my python code in the terminal, it recognizes that my I2C device is connected and prints my I2C data to the terminal. But if I use the exec node with my python code (python code handles I2C), node-red hangs and my code doesn't output anything at all. Likewise, if I use the daemon node, I get a "command not found" error despite using the same command I'd use on the terminal to run my code (e.g. python /home/pi/mycode.py).
If I use the I2C nodes, those nodes complain that I have a "remote I/O error" despite having a device connected on the I2C pins. I even ran i2cdetect -y 1 (default I2C bus address) and I found the I2C address used. Likewise, if I use the Johnny 5 nodes, I get an error that "no such file/directory" exists despite having installed Johnny 5 on node-red.
Any help would be appreciated, as I've been trying this for almost a whole day to no avail.
EDIT: I figured it out. Thanks.