Tag Archives: seeeduino

Seeeduino XIAO – Objects Detection

After the Arduino IDE environment  configuration for the Seeeduino XIAO board in the previous article

Seeeduino XIAO – Arduino Envinronment

in this we will make a small example with this card.

In the project we’ll use the following components

  1. Ultrasonic sensor HC-SR04
  2. I2C  Oled  Display 0,96 pollici SSD1306

The first step is to install the libraries of the two components listed above on Arduino.

In the Arduino IDE, go to the menu  Sketch->Include Library->Manage Libraries

addlib-enFor HCSR04 we choose HCSR04 by Martin Sosic

hcsr04-enFor SSD1306 we choose ACROBOTIC SSD1306

SSD1306-en

Now we have all the components for the project. We connect the components to the Seeeduino XIAO as listed in the following table

XIAO PINSSD1306 PINHCSR04 PIN
3V3VDD
GNDGNDGND
5VVCC
D2ECHO
D1TRIG
D5SCK
D4SDA

As can be seen from the table, we use the I2C and digital pins 1,2  of the XIAO

pinsexampleBelow is the connections diagram

xiaoconnectionsThe example code is the following

If an object passes through the sensor’s field of view, the event is signaled on the OLED screen with the recorded measurement. Inside the code there are the descriptions of all the operations performed.

Here is the link to the source code file

exampleXiao.ino

Seeeduino XIAO – Arduino envinroment

After listing the main features of the Seeeduino XIAO board

Seeeduino XIAO Board

in this article we prepare the Arduino development environment.

The first step is to download the Arduino Ide

Arduino IDE

Our Arduino IDE version is 1.8.5.

After downloading the IDE, start it and add the Seeeduino XIAO board repository by accessing File-> Preferences. In the tab “Settings” locate the “Additional  Board Manager URLs ” field and  add the link

https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

board-enPress OK to update the settings.

Open now  Tools->Boards->Board Manager and enter in the search box “Seeeduino XIAO”.

xiao-en

The “Seeed SAMD Boards” card is identified. It is installed with the “Install” button.

At this point on Linux the card is already visible on the USB port, while in Windows 7 we installed also the drivers available at the link

Windows Drivers

The following parameters are set for the Seeeduino XIAO board from the Tools menu

  • Board:Seeeduino XIAO
  • USB Stack: Arduino
  • Port: USB port connected to the XIAO. In the port description is visible the reference (Seeeduino XIAO)

xiasetttings-enTo check that the whole environment is installed correctly, try the Arduino Blink test example, available in the menu File->Examples->01.Basics->Blink

blink-en

The example does nothing but turn off and on the yellow LED on the device.

In the next article we will make a small example with devices connected to the pins of the Seeeduino XIAO

Seeeduino XIAO – Objects Detection

Seeeduino XIAO Board

This article describes the Seeeduino XIAO development board

Seeeduino XIAO

Seeeduino-XIAO-pinout

The general specifications of the card are

CharacteristicValue
CPUARM Cortex-M0+ CPU(SAMD21G18) running at up to 48MHz
Flash Memory256KB
SRAM32KB
Digital I/O Pins11
Analog I/O Pins11
I2C interface1
SPI interface1
UART interface1
Power Led Green
Test LedYellow
TX Serial LedBlue
RX Serial LedBlue
Power supply and downloading interfaceUSB Type C
Supply Voltage3.3V/5V DC
Dimensions20×17.5×3.5mm

As shown in the  table,  peculiar aspects of the board are the following

  • Powerful CPU: ARM® Cortex®-M0+ 32bit 48MHz microcontroller(SAMD21G18) with 256KB Flash,32KB SRAM.
  • Compatible with Arduino IDE and CircuitPython.
  • Breadboard-friendly.
  • As small as a thumb(20×17.5mm) for wearable devices and small projects.
  • Multiple development interfaces: 11 digital/analog pins, 10 PWM Pins, 1 DAC output, 1 SWD Bonding pad interface, 1 I2C interface, 1 UART interface, 1 SPI interface.

Here are the links to the Seeed wikis for configuration with Arduino and CircuitPython

Seeeduino XIAO with IDE Arduino

Seeeeduino XIAO with CircuitPython

CircuitPython is a simplified Micropython derived project for microcontrollers

CircuitPython 

The board is programmed via USB Type C connection. It also offers a pad for power supply as well as the SWD (Serial Wire Debug) interface in the back part.

seeeduino-xiao-pinout-back

The board supports multiplexing pin and the same pin can be used,depending on the function that uses it,  as analog, digital pin, etc.

On the upper part of the board there are two pins for resetting the board itself and for setting it in dfu mode for loading another bootloader (for example CircuitPython).

Seeeduino-XIAO-reset

To reset or load another bootloader, connect the board via USB Type C and reset it by short-circuiting quickly the reset pins. When the orange LED starts to light up and  flicker, the board is ready to load the firmware. Use this method even if the board is no longer visible on the USB port of the PC.

The board is available directly from the Seeed website

Seeeduino XIAO

In the next articles we set up the Arduino IDE for a small project with Seeeduino XIAO

Seeeduino XIAO – Arduino envinronment

 

About Seeed

Seeed is the IoT hardware enabler providing services over 10 years that empower makers to realize their projects and products. Seeed offers a wide array of hardware platforms and sensor modules ready to be integrated with existing IoT platforms and one-stop PCB fabrication and PCB assembly service. Seeed Studio provides a wide selection of electronic parts including Arduino Raspberry Pi and many different development board platforms Especially the Grove System help engineers and makers to avoid jumper wires problems. Seeed Studio has developed more than 280 Grove modules covering a wide range of applications that can fulfill a variety of needs.