I tried to follow the instruction below to send sensor data from my raspberry pi 2 to Azure.
Connect Raspberry Pi to Azure IoT Hub (Node.js)
I connected the sensors to my pi device in a different way. Not sure if this is the issue, but I am able to read sensor data through a python script from my raspberry pi terminal. Then when I tried to
sudo node index.js '<YOUR AZURE IOT HUB DEVICE CONNECTION STRING>'
But received the below error message
{ [Error: , Remote I/O error] errno: 121, code: '', syscall: 'writeByte' }
I have enabled I2C through Raspberry config. And when I checked i2c addresses, as suggested from my search online, it returned nothing. No number value is returned. What does this mean? Is this the problem that caused the error?
Remote I/O Error
indicates to me that you're able to connect to azure, but are erroring out when you're trying to write the data to azure cloud. Are you able to check and verify that the sensor data is correctly being read on the pi ? I'd start there... i.e check what's being sent to Azure and whether the correct data is being sent.