git clone https://github.com/sixfab/Sixfab_RPi_CellularIoT_Library.git
cd Sixfab_RPi_CellularIoT_Library
sudo python3 setup.py install
and
sudo pip3 install sixfab-cellulariot
I created a python file for relay:
from cellulariot import cellulariot
import time
node = cellulariot.CellularIoTApp()
node.setupGPIO()
node.disable()
time.sleep(1)
node.enable()
time.sleep(0.5)
node.turnOnRelay()
time.sleep(2)
But when I tried: python3 relay.py
I have this error:
Traceback (most recent call last):
File "relay.py", line 1, in <module>
from cellulariot import cellulariot
File "/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py", line 11, in <module>
ModuleNotFoundError: No module named 'RPi'
Sixfab Raspberry Pi Cellular IoT Application Shield Class initialized!
Traceback (most recent call last):
File "relay.py", line 7, in <module>
node.turnOnRelay()
File "/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py", line 756, in turnOnRelay
RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM)
/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py:125: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
Sorry, mistake, I have raspberry-pi-cellular-iot-application-shield .
When I try sample sensor_test.py
Sixfab Raspberry Pi Cellular IoT Application Shield Class initialized!
BG96 module disabled!
BG96 module enabled!
Traceback (most recent call last):
File "sensor_test.py", line 18, in <module>
print("Acceleration: "+str(node.readAccel()))
File "/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/cellulariot.py", line 724, in readAccel
File "/usr/local/lib/python3.7/dist-packages/sixfab_cellulariot-1.2.0-py3.7.egg/cellulariot/MMA8452Q.py", line 33, in __init__
FileNotFoundError: [Errno 2] No such file or directory