In this tutorial you get acquainted with the Dwenguino board. Step by step you'll learn how to install Arduino IDE and the necessary Dwenguino additions. After this tutorial you will be able to blink a LED!
- One Dwenguino board
- Enclosed USB cable
- Internet connection
Installation of the software
- Download and install the Arduino IDE version 1.6.4 or higher.
- Open the Arduino IDE, go to File > Preferences > Additional Boards Manager URLS, copy and paste the following link without quotes "http://www.dwengo.org/sites/default/files/package_dwengo.org_dwenguino_index.json" and click OK.
- Go to Tools > Board > Boards Manager, search for "Dwenguino" and click Install.
Depending on your operating system some additional steps are required:
- Windows users should also install the correct driver (see next paragraph).
- Mac users are ready to go, no additional steps are required.
- Linux users can have troubles with the permissions of the serial port (see paragraph below for solutions).
Windows driver installation
- Attach the Dwenguino with the USB cable and go to Device manger (right click on My Computer and press manage, choose in the menu at the left Device Manager as shown in the following picture) and click on the Other devices menu. Right click on the Dwenguino and select Update driver software.
- Click Browse my computer for driver software and click on Browse. Select your User folder and press OK. Remark: make sure the checkbox "Include subfolders" is enabled and press next.
- The required driver will be installed now. When a Windows Security popup appears, then press Install this driver software anyway.
- When the installation is finished, Windows will notify Windows has successfully updated your driver software. Press Close and you have completed the installation procedure. You can now find the connected Dwenguino board in Tools > Port.
Please beware that the procedure described above is not compatible with Windows 8 or higher because of very strict USB certificate policies. You can however disable this USB verification procedure by following these steps. After that, the Dwenguino works just fine. The Dwenguino is not USB certified. Please refer to talk of Ian Lesnet on the Open Hardware Summit for an explanation of the context.
(Debian distributions like Ubuntu, Mint, etc...)
If you have trouble with the permissions of the serial port, this will result in the ports option in the menu being grey (unclickable). Also it may not work with a USB3.0 interface on your computer. In that case try the following fix :
- Close the Arduino IDE, insert the USB connector into a USB2.0 port instead, and open a terminal.
- Run the following sequence of commands:
sudo usermod -a -G dialout $yourUserName sudo usermod -a -G tty $yourUserName
- Logout and log back in. Launch the IDE and it should be accessible now.
You might still have troubles uploading programs to the board. We are fixing this issue, in the meanwhile try the following:
- Remove the package modem manager with the following command:
sudo apt-get purge modem manager*
If you still get an error while trying to upload to the board, give read/write access to the serial port to all users (you need to change access rights to the port where the Dwenguino is connected, e.g. /dev/ttyACM0):
sudo chmod 666 /dev/ttyACM0
For any other problems, please use the forum to ask your questions. We will be happy to help.
Start by opening Arduino IDE. You should see an empty sketch with a setup-function and loop-function. Now choose in the menu File > Examples > 1. Basics > Blink. The following sketch should appear:
The sketch has two main parts: (1) the setup-function and (2) the loop-function. By using the pinMode-function pin number 13 is set as a digital output. Note that we changed the example: number 13 is now stored in the integer variable led. This makes it easier to change it afterwards. In the loop-function pin number 13 is switched from high to low and vice versa every 1000 milliseconds.
Testing the blinking LED on Dwenguino
We now want to test the blinking LED example. Therefore we need to compile the code and upload it to the Dwenguino. Make sure that you select Dwenguino in the Tools > Board menu. Next, connect the Dwenguino to your computer and select the right communication port in the Tools > Port menu (HINT: you might want to look into this menu before and after you connect the Dwenguino to your computer. Usually, the port you have to select is the one that appears when the Dwenguino is connected). Finally, click on the upload icon in Arduino IDE which is highlighted here:
Now LED LD13 (top left corner of the Dwenguino board) should blink every second!
Blinking other LEDs
Bored of having LD13 blinking? Choose another LED changing the value of the variable led in your sketch, for example:
- int led = LED0; //LED LD0 will blink
Manual (Offline install)
Warning: We highly recommend using the board manager installation procedure as described above: it's easier, it's platform independent and it can handle Dwenguino software updates. The only drawback is that an internet connection is required on every computer during the installation. Only if an internet connection is really unavailable or you want to use an older Arduino IDE version (< 1.6.4), you can download the necessary installation packets in advance (e.g. to a USB stick) and install them using the following steps:
- Download the Arduino IDE version 1.5.x or higher.
- Download the Dwenguino library.
- Install the Arduino IDE and open the Arduino IDE a first time.
- Search for an "Arduino" folder in your user home folder: My Documents on Windows, home folder on Mac and Linux. Make a new subfolder "hardware".
- Copy and paste the Dwenguino.zip file into this "hardware" folder and extract the library.
- Go to the "Dwenguino" folder and make a new subfolder "avr". Cut and paste the previous content of the "Dwenguino" folder into this new subfolder "avr" ("
- Follow the steps in the previous sections to install the Windows driver or to set the right Linux serial permissions.
- Restart the Arduino IDE. If all goes well, you should be able to find "Dwenguino" in the Tools > Boards menu and upload the blinking example.