UPER1 Getting started
Connecting the device
Windows
- Connect UPER board and your computer using the USB cable.
- Once connected your computer should notify that a new device has been connected.
- Download UPER device drivers and save them on your computer.
- Open up windows device manager (how?). You should see two devices with yellow exclamation marks (see picture ). Press right mouse button on UPER COM device and click "Update driver software", then choose "Browse my computer for driver software". In the next window browse for a path where you have downloaded the device drivers, check "Include subfolders" and click next. Windows should now install device drivers. Repeat the same step with UART Bridge device.
- Once finished you should be able to see two new devices in the device managers Port category ( picture)
Linux/OpenWrt/Mac
- Connect UPER board to you computer using the USB cable.
- Check that the operating system has recognized the UPER board and created two serial USB ports by entering
ls /dev/ttyACM*
into the terminal.
If for some reason /dev/ttyACM* is not created, you need to install ACM drivers on your system. The steps and modules are distribution dependent, but searching for keywords "DISTRIBUTION_NAME usb cdc acm driver" should guide you to the right direction. As an example for OpenWRT (Carambola) you need to install usb-acm module.
Blinking the LED
Windows
- Open UPER command serial port using a terminal program (e.g. putty or Termite)
- Enter
setPrimary(29); pinMode(29, 1)
into the terminal. This will configure the 29th pin to be digital output pin, which by default will turn on the red LED. - Enter
digitalWrite(29, 1)
. This will drive 29th pin high and turn off the LED. - Enter
digitalWrite(29, 0)
. This will drive 29th pin low and turn on the LED again. By entering the last two commands repeatedly you can blink the LED. - You can repeat these steps by changing 29 to 28 or 22 and blinking green or blue LEDs accordingly.
Linux/OpenWrt/Mac
If you have a serial terminal program you can follow the steps explained in windows category. Otherwise do this:
- Open console or terminal
- Enter
echo "setPrimary(29); pinMode(29, 1)" > /dev/ttyACM0
into the terminal 1). This will configure the 29th pin to be digital output pin, which by default will turn on the red LED. - Enter
echo "digitalWrite(29, 1)" > /dev/ttyACM0
. This will drive 29th pin high and turn off the LED. - Enter
echo "digitalWrite(29, 0)" > /dev/ttyACM0
. This will drive 29th pin low and turn on the LED again. By entering the last two commands repeatedly you can blink the LED. - You can repeat these steps by changing 29 to 28 or 22 and blinking green or blue LEDs accordingly.
Using Python API
1)
Note: UPER1 command port might be other than /dev/ttyACM0. In such case test other /dev/ttyACM* ports.