EdgeBox-RPI-200 User Manual
WWW.SEEEDSTUDIO.COM 15
3 Drivers and Programming Interfaces
3.1 LED
The is a LED used as user indicator, refer to 2.2.8. Use LED2 as a example to test the function.
$ sudo -i #enable root account privileges
$ cd /sys/class/gpio
$ echo 21 > export #GPIO21 which is user LED of LED2
$ cd gpio21
$ echo out > direction
$ echo 0 > value # turn on the user LED, LOW active
OR
$ echo 1 > value # turn off the user LED
3.2 Serial Port (RS232 and RS485)
There are two individual serial ports in the system. The /dev/ ttyACM1 as RS232 port and
/dev/ ttyACM0 as RS485 port. Use RS232 as a example.
$ python
>>> import serial
>>> ser=serial.Serial('/dev/ttyACM1',115200,timeout=1)
>>> ser.isOpen()
true
>>> ser.isOpen()
>>> ser.write('1234567890')
10
3.3 Cellular over Mini-PCIe
Use Quectel EC20 as a example and follow the steps:
1. Insert the EC20 into Mini-PCIe socket and micro sim card in related slot, connect the