I plan to use StandardFirmata (already flashed to the Arduino board) protocol and be able to read/write to MMA7660FC 3-Axis Orientation/Motion Detection Sensor, which is already mounted on a Grove Beginner Kit pcb.
Using Arduino code i2c_scanner.ino, I can see the various devices over I2C bus. But I am unable to read/write to the accelerometer (device address is 0x19.
I am using a MacBook and want to work off of that and not Raspberry Pi.
I used the following lines of code:
from smbus2 import SMBus
bus = SMBus(1)
And got this error:
File "/Users/sth/Documents/Arduino/smbus_test.py", line 63, in <module>
bus = SMBus(1)
File "/Users/sth/mypython/lib/python3.7/site-packages/smbus2/smbus2.py", line 279, in __init__
self.open(bus)
File "/Users/sth/mypython/lib/python3.7/site-packages/smbus2/smbus2.py", line 308, in open
self.fd = os.open(filepath, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'