MyPi ZigBee RF Card Configuration

The ISO-DIGOUT card provides 4 x Digital Inputs (>=5V Input) as well as an Wireless Things "ARF" / XBEE style RF Module Socket

 

The following line needs to be added to /boot/config.txt to enable the hardware UART0 to appear on the correct pins for the adapter card :

 

dtoverlay=uart0,txd1_pin=32,rxd1_pin=33

 

This enables /dev/ttyAMA0 and the serial lines are connected to the ARF/XBEE Socket Pins 2 & 3 

If you require the RTS/CTS lines use the uart0-full overlay and short solder Links LK1 & LK2 on the MyPi RF card to enable the RTS/CTS lines to the appropriate pins.

 

The GPIO lines are connected to is as follows :

GPIO38 => DIGIN1

GPIO41 => DIGIN2

GPIO42 => DIGIN3

GPIO43 => DIGIN4

 

The easiest way to configure this is via the command sequence below as root user :

 

# gpio export 38 in
# gpio export 41 in
# gpio export 42 in
# gpio export 43 in
# ln -s /sys/class/gpio/gpio38/value /dev/diginput0
# ln -s /sys/class/gpio/gpio41/value /dev/diginput1
# ln -s /sys/class/gpio/gpio42/value /dev/diginput2
# ln -s /sys/class/gpio/gpio43/value /dev/diginput3


 

This will create the below shortcuts :

 

# ls -l /dev/dig*
lrwxrwxrwx 1 root root 28 Mar 10 12:00 /dev/diginput0 -> /sys/class/gpio/gpio38/value
lrwxrwxrwx 1 root root 28 Mar 10 12:00 /dev/diginput1 -> /sys/class/gpio/gpio41/value
lrwxrwxrwx 1 root root 28 Mar 10 12:00 /dev/diginput2 -> /sys/class/gpio/gpio42/value
lrwxrwxrwx 1 root root 28 Mar 10 12:00 /dev/diginput3 -> /sys/class/gpio/gpio43/value

 

To read a digital input state :

$ cat /dev/diginput0
0
$ cat /dev/diginput0
1

 

 

For more information on the usage of the RF modules please consult the suppliers website directly

 

 

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us