Projects‎ > ‎

Arduino Getting Started


This page provides informatin on how to get started with your Arduino DABShield Project.

Installing the Arduino Integrated Development Environment (IDE)

The Arduino IDE is the software where you write your code and upload it to the arduino baord.

This Getting Started assumes that you will use the Windows Desktop Ariduion IDE.

The IDE software can be downloaded from https://www.arduino.cc/en/Main/Software

This page also contains a getting started link which shows you how to install the software.

There is also a good introduction to Using the IDE.




Adding the WeMos SAMD21 (Zero/M0 Compatible) Board Manager URL

To use the WeMos Zero Board, DabShield provide a Board Manager for this.  The URL of the Board Manager is added by selecting File menu, then Preferences. The URL "https://raw.githubusercontent.com/dabshield/WeMos/master/package_wemos_index.json" should be added into the Additional Boards Manager URLs, Click on OK.

Adding the Atmel SAMD Core to IDE for the Arduino SAMD devices (such as M0)

To use the Arduino M0 (or other SAMD device) with the IDE you need to install the SAMD Core to it.  This is a one time proceedure that is done by openning the Arduino IDE and then selecting Tool menu, then Board: and then Boards Manager.

In the Boards Manager, scroll down until you see teh "Arduino SAMD Bards (32-bit ARM Cortex-M0+) by Arduino" for Arduino boards, Click within this area and then select Install.

For the WeMos SAMD21 Zero, scroll down until you see the "WeMos M0 Board by DAB Shield", Click within this area and then select Install.

After a while the Installation is complete, select Close.

Installing Drivers

Connect the board to your computer with a USB cable.  Windows should initiate its automatic driver installion process.  When th process is complete, you should find in Device Manager (Window Key + 'X', then deivce manager) a port listing "Arduino <device> Port (COMx)".

Selecting the board and Port

You need to select your baord e.g. "Arduino M0" or "WeMos M0 (Native USB Port)" from the Tool > Board menu:

and the Com port from the Tool > Port menu:
The IDE is now installed and set up for your Board.

Adding the DABShield Library

The DABShield Library is Arduino code that is supplied that does the low level communications to the DAB Radio chipset and provides you with a simpler more user friendly set of function calls.  The Library can be downloaded from the Library page.  Download the .zip file and save it to your downloads directory (or somewhere you can easily find it e.g. your desktop).

To add the Library to your Arduino IDE go to Sketch>Include Library and select Add .ZIP Library
Select the DABShield.zip from where you downloaed it to and click Open. 

In a similar way, other Librarys can be added (such as the 1602LCD library used from the LCD DAB Radio Project).

Adding a DAB example sketch

Example Sketches (code) can be downloaded from the Projects page. Downlaod the .zip file and save it to your downloads directory (or somehwere you can easilly find it e.g. your desktop).  Once you have downlaoded the project, unzip the project (right click, extract all).  This will create a directory at the same location that contains the sketch.

In the Aruduino IDE to go File>Open, and chose the .ino file that is inside the project directory.

Compiling a Sketch

Compiling is the process that converts the human readable code into the Arduino processor executable program.  To do this select Sketch>Verify/Compile or click on the 'Tick' icon which say Verify when you hover over it.  If everything is set up correctly after a little while you will get a message saying "Done compiling".

Uploading to your Board

With the USB cable and power disconnected, Assemble the DABShield and another other shields together for your project.  Carefull to align the pins to the connectors.  Connect the Board to your PC with a USB Cable.

To upload your program to your board select Sketch>Upload or click on the forward arrow icon that says Upload whne you hover over it.  After a littel while you will get a message saying "Done uploading" and your program will start running on the Arduino board.

Setting up the Serial Monitor

The Arudino boards use the USB port as a Virtual Serial Port and can transmit and recieve data over this port.  The Command Line Radio example project uses this for the Control of the DABShield.  The Serial Monitor can be opened by Tools>Serial Monitor.  The first time this is used Carriage return needs to be slected from the bottom drop down box - this adds the Carriage Return character to the end of each sent command.


Comments