Arduino ZERO  What are they? + Features and Utility ‚Ė∑ 2021

The Arduino ZERO board is intended for those users who run projects that do not support the classic Arduino UNO. This is due to the processing power of the MCU, flash memory, and CPU clock.

Due to this it is important that you know what Arduino ZEROs are and what these boards are for in electronics. This information can be found in the paragraphs of this article.

Also, we will show you the main characteristics of the board and the criteria that you must take into account when working with the Arduino ZERO. Take a look at this powerful board.

What are the Arduino Zero and what are these electronic development boards for?

The plate Arduino ZERO is a device that has an electronic bus that includes a ATMEL Cortex-M0 SAMD21 32-bit core MCU. It is characterized by having a program debugging, or debug, making it possible for the user not to need any external hardware.

It has all the necessary technology to work on Internet of Things projects. It is necessary to clarify that its operation is a little lower than that of other plates, since the voltage it supports is 3.3V. All pins except 4 work with external interrupts of type 0 and 1. On the other hand, the direct current, both input and output, is 7 mA and the CPU clock speed reaches the 48 MHz.

Features What are the main features of this Arduino board?

Features What are the main features of this Arduino board?

The main features that this Arduino board has are:

  • It is ideal for working in robotics, automation and technology projects.
  • Has a embedded debugger that connects to the hardware of the MCU with which you can program the SAMD21 through an interface SWD. This also allows full access to the microcontroller and work with the program codes to modify them.
  • The external power that Arduino ZERO has It is done by means of a center-positive connector or by the GND and VIN pins that are located in the header of this 2.1 mm connector. This means that there is no USB port to power the board.
  • The PWM are 3, 4, 5, 6, 8, 9, 10, 11, 12 and 13; while the analog inputs They‚Äôre in A0 to A5. The output voltage is at the DAC, which is channel A0.
  • The SPI is located at SS, MOSI, MISO and SCK of the palca.
  • Owns a watch that works 48MHz, so real time and calendar can be counted.

What should I keep in mind when working with Arduino ZERO boards?

What should I keep in mind when working with Arduino ZERO boards?

The first thing you should know is that the plate Arduino ZERO works with a voltage of 3.3V, slightly lower than the rest of the other plates. For this reason, you must take this restriction into account because you could burn the microprocessor and other components. When you work in the IDE and open the monitor, the microcontrollers and the sketch execution do not restart, so you will have to restart the process through a button that you will find on the dashboard of the software Arduino.

Power is not via USB input, which could complicate the project if you want to use the 2.1mm connector for another circuit connection. By last, you must be careful in the amount of processes that you attribute to the project. While it is true that this board is far superior in power to the Arduino UNO and you have a powerful microcontroller, a good memory and a 48 MHz clock, you must always be attentive to the load that you transfer to it.

List of the best projects you can do with Arduino ZERO boards

Learn about the best projects you can carry out with an Arduino ZERO board:

WiFi Controlled NeoPixel Screen

WiFi Controlled NeoPixel Screen

With this project you will be able to create a screen of NeoPixel managed by Wifi. You will need one Arduino ZERO board, a ring with NeoPixel-type lights, several LEDs, a breadboard, a 1000 ¬ĶF capacitor, a 475 ohm resistor and cables to generate the connections. The assembly will have to be done following the descriptions and specifications of the parts and considering the pins of the board, according to everything we have talked about in this post.

When you have the assembly ready, you must enter the following code:

#include <Adafruit_NeoPixel.h>

#include <WiFi101.h>

#define PIN 12

#define NUMPIXELS 10

#define interval 50

#define wifiRetryTimes 0

Adafruit_NeoPixel píxeles  =  Adafruit_NeoPixel ( NUMPIXELS ,  PIN ,  NEO_GRB  +  NEO_KHZ800 );

uint32_t rojo  =  píxeles . Color ( 255 ,  0 ,  0 );

uint32_t azul  =  píxeles . Color ( 0 ,  0 ,  255 );

uint32_t verde  =  píxeles . Color ( 0 ,  255 ,  0 );

uint32_t pixelColour ;

uint32_t lastColor ;

float activeColor []  =  { 255 ,  0 ,  0 };

IPAddress apIP ( 192 ,  168 ,  0 ,  150 );

IPAddress netMsk ( 255 ,  255 ,  255 ,  0 );

Dirección IP gw ( 192 ,  168 ,  0 ,  1 );

Dirección IP dns ( 192 ,  168 ,  0 ,  1 );

IP de cadena ;

char APssid []  =  "MKR1000" ;

char APpass []  =  "MKR1000" ;

char ssid []  =  "YourSSID" ;

char pass []  =  "YourPassword" ;

int keyIndex  =  0 ;

int status  =  WL_IDLE_STATUS ;

Servidor WiFiServer ( 80 );

const char  html1 []  PROGMEM  =

"<! DOCTYPE html> <html> <head> <meta http-equiv = 'X-UA-Compatible' content="IE = Edge"> <meta charset="utf-8"> <title> Neopixel Color Picker < / título> "

"<style type="text / css">. bt {display: block; width: 250px; height: 100px; padding: 10px; margin: 10px; text-align: center; border-radius: 5px; color: white; font-weight: bold; font-size: 40px; text-decoration: none;} body {background: # 000;} "

".red {fondo: rojo; color: blanco;}. verde {fondo: # 0C0; color: blanco;}. azul {fondo: azul; color: blanco;}"

".white {fondo: blanco; color: negro; borde: 1px negro s√≥lido;}. off {fondo: # 666; color: blanco;}. colorPicker {fondo: blanco; color: negro;}. colorWipe {tama√Īo de fuente : 40px; fondo: degradado lineal (a la derecha, rojo, # 0C0, azul);} "

".theatreChase {font-size: 40px; background: linear-gradient (a la derecha, rojo, negro, rojo, negro, # 0C0, negro, # 0C0, negro, azul, negro, azul);}"

".rainbow {tama√Īo de fuente: 40px; fondo: rojo; fondo: degradado lineal (a la derecha, rojo, naranja, amarillo, verde, azul, √≠ndigo, violeta, rojo, naranja, amarillo, verde, azul, √≠ndigo, violeta) );} "

".rainbowCycle {tama√Īo de fuente: 40px; fondo: rojo; fondo: degradado lineal (a la derecha, rojo, naranja, amarillo, verde, azul, √≠ndigo, violeta);}"

".rainbowChase {tama√Īo de fuente: 40px; fondo: rojo; fondo: degradado lineal (a la derecha, rojo, negro, naranja, negro, amarillo, negro, verde, negro, azul, negro, √≠ndigo, negro, violeta); } " ;

const char  html2 []  PROGMEM  =

".breathe {fondo: azul; color: blanco;}. cylon {fondo: rojo; color: negro;}. latido {fondo: rojo; color: blanco;}. NAVIDAD {tama√Īo de fuente: 40px; fondo: rojo; fondo: degradado lineal (a la derecha, rojo, verde, rojo, verde, rojo, verde, rojo, verde, rojo, verde, rojo, verde);} "

".TODOS {fondo: blanco; color: azul;}. Y {fondo: # EE0; alto: 100px; ancho: 100px; radio del borde: 50px;}. B {fondo: # 000; alto: 100px; ancho: 100px; border-radius: 50px;}. A {font-size: 35px;} td {vertical-align: middle;} "

"td {vertical-align: middle;} </style> </head>"

"<script type="text / javascript">" ;

const char  html3 []  PROGMEM  =

"función ResetWebpage () {if (window.location.href! = 'http: // # IPADDRESS /') {window.open ('http: // # IPADDRESS /', '_ self', true)}};" // cambie el valor del sitio web aquí a su sitio web estático

"función myFunction () {document.getElementById ('brilloLevel'). submit ();} </script>"

"<body onload = 'ResetWebpage ()'> <table> <tr> <td width="100"> <div class="TGT00"> </div> </td> <td> <a class="bt red "href="https://internetpasoapaso.com/ L00? v = 1"> Rojo </a> </td> <td> <a class="bt colorWipe" href="http://internetpasoapaso.com/L01?v=1"> Color Wipe </a> </td> <td> <div class="TGT01"> </div> </td> </tr> "

"<tr> <td> <div class="TGT02"> </div> </td> <td> <a class="bt green" href="http://internetpasoapaso.com/L02?v=1"> Verde </a> </td> <td> <a class="bt theatreChase" href="http://internetpasoapaso.com/L03?v=1"> Theatre Chase </a> </td> <td> <div class="TGT03"> </ div > </td> </tr> "

"<tr> <td> <div class="TGT04"> </div> </td> <td> <a class="bt blue" href="http://internetpasoapaso.com/L04?v=1"> Azul </a> </td> <td> <a class="bt rainbow" href="http://internetpasoapaso.com/L05?v=1"> Rainbow </a> </td> <td> <div class="TGT05"> </div> </td> </tr> "

"<tr> <td> <div class="TGT06"> </div> </td> <td> <a class="bt white" href="http://internetpasoapaso.com/L06?v=1"> White </a> </td> <td> <a class="bt rainbowChase" href="http://internetpasoapaso.com/L07?v=1"> Rainbow Chase </a> </td> <td> <div class="TGT07"> </ div > </td> </tr> " ;

const char  html4 []  PROGMEM  =

"<tr> <td> <div class="TGT08"> </div> </td> <td> <a class="bt cylon" href="http://internetpasoapaso.com/L08?v=1"> Cylon Chaser </ a > </td> <td> <a class="bt rainbowCycle" href="http://internetpasoapaso.com/L09?v=1"> Rainbow Cycle </a> </td> <td> <div class="TGT09"> </ div> </td> </tr> "

"<tr> <td> <div class="TGT10"> </div> </td> <td> <a class="bt breathe" href="http://internetpasoapaso.com/L10?v=1"> Breathe </a> </td> <td> <a class="bt heartbeat" href="http://internetpasoapaso.com/L11?v=1"> Heartbeat </a> </td> <td> <div class="TGT11"> </div> </td> </tr> "

"<tr> <td> <div class="TGT12"> </div> </td> <td> <a class="bt XMAS" href="http://internetpasoapaso.com/L12?v=1"> Navidad </a> </td> <td> <a class="bt ALL" href="http://internetpasoapaso.com/L13?v=1"> Ciclo TODO </a> </td> <td> <div class="TGT13"> </ div > </td> </tr> "

"<tr> <td> <div class="TGT14"> </div> </td> <td> <a class="bt off" href="http://internetpasoapaso.com/L14?v=1"> Desactivado </a> </td> <td> <form id = 'shineLevel'> <input type="range" name="bright" max = '255' min = '0' value="# BRIGHT" onchange="myFunction ()" class="bt off"> </form> </td> </tr> "

"</table> </body> </html>" ;

String sendHtml3  =  html3 ;

String sendHtml4  =  html4 ;

String currentLine;

boolean NeoState[] = {false, false, false, false, false, false, false, false, false, false, false, false, false, false, true}; //Active Neopixel Function (off by default)

int neopixMode = 0;

long previousMillis  =  0 ;

long lastAllCycle  =  0 ;

long previousColorMillis  =  0 ;

int i  =  0 ;

int CWColor  =  0 ;

int j ;

int ciclo  =  0 ;

int TCColor  =  0 ;

int l  =  0 ;

int m  =  0 ;

int n  =  2 ;

int respiradero  =  0 ;

latido booleano =  verdadero ;

int beats  =  0 ;

int brillo  =  150 ;

int o  =  0 ;

int q  =  5 ;

uint32_t lastAllColor  =  0 ;

configuración vacía () {

píxeles . comenzar ();

píxeles . setBrightness ( brillo );

writeLEDS ( 0 , 0 ,  0 );

Serial . comenzar ( 9600 );

Serial . println ( ssid );

if ( WiFi . status ()  ==  WL_NO_SHIELD )  {

Serial . println ( F ( "escudo WiFi no presente" ));

while ( verdadero );

}

WiFi . config ( apIP );

//WiFi.config(apIP, dns, gw, netMsk);

while (  status  ! =  WL_CONNECTED )  {

para ( int  x  =  0 ;  x  <=  wifiRetryTimes ;  x ++ )

{

Serial . print ( F ( "Intentando conectarse a la red denominada:" ));

Serial . println ( ssid );

}

Serial . print ( F ( "No se pudo conectar a Wifi" ));

estado =  WiFi . beginAP ( APssid ); // crea un AP - IP es actualmente estático a 192.168.1.1

// estado = WiFi.beginAP (APssid, APpass);

retraso ( 10000 );

romper ;

}

printWifiStatus ();

sendHtml3 . reemplazar ( "#IPADDRESS" , IP );

sendHtml4 . reemplazar ( "#BRIGHT" , "150" );

Serial . println ( F ( "¬°¬°Servidor USP iniciado !!" ));

servidor . comenzar ();

Serial . println ( F ( "¬°¬°servidor HTTP iniciado !!" ));

}

bucle vacío () {

Cliente WiFiClient =  servidor . disponible ();

if ( cliente )  {

println(F("new client"));

currentLine = "";

while (client.connected()) {

if (client.available()) {

char c = client.read();

Serial . escribir ( c );

if ( c  ==  ' n' )  {

cliente . println ( "Tipo de contenido: texto / html" );

cliente . println ();

cliente . imprimir ( F ( html1 ));

cliente . imprimir ( F ( html2 ));

cliente . imprimir ( sendHtml3 );

cliente . imprimir ( sendHtml4 );

cliente . println ();

romper ;

}

else {       // si tiene una nueva línea, vas a tener que borrar currentLine:

if ( currentLine . indexOf ( "Referer" )  <  0 )  { // realiza siempre que Referer no esté en el valor devuelto

if ( currentLine . indexOf ( "/ L00" )  >  0 )  { // si / L00 está presente en la cadena

handle_L00 (); // ejecuta la función

}

if ( currentLine . indexOf ( "/ L01" )  >  0 )  {

handle_L01 ();

}

if ( currentLine . indexOf ( "/ L02" )  >  0 )  {

handle_L02 ();

}

if ( currentLine . indexOf ( "/ L03" )  >  0 )  {

handle_L03 ();

}

if ( currentLine . indexOf ( "/ L04" )  >  0 )  {

handle_L04 ();

}

if ( currentLine . indexOf ( "/ L05" )  >  0 )  {

handle_L05 ();

}

if ( currentLine . indexOf ( "/ L06" )  >  0 )  {

handle_L06 ();

}

if ( currentLine . indexOf ( "/ L07" )  >  0 )  {

handle_L07 ();

}

if ( currentLine . indexOf ( "/ L08" )  >  0 )  {

handle_L08 ();

}

if ( currentLine . indexOf ( "/ L09" )  >  0 )  {

handle_L09 ();

}

if ( currentLine . indexOf ( "/ L10" )  >  0 )  {

handle_L10 ();

}

if ( currentLine . indexOf ( "/ L11" )  >  0 )  {

handle_L11 ();

}

if ( currentLine . indexOf ( "/ L12" )  >  0 )  {

handle_L12 ();

}

if ( currentLine . indexOf ( "/ L13" )  >  0 )  {

handle_L13 ();

}

if ( currentLine . indexOf ( "/ L14" )  >  0 )  {

handle_L14 ();

}

if ( currentLine . indexOf ( "brillante" )  >  0 )  {

handle_bright ();

}

}

currentLine =  "" ;

}

}

else if  ( c  ! =  ' r' )

currentLine + =  c ;

}

if ( currentLine . endsWith ( "/ generate_204" ))  {

handle_root ();

}

}

}

// cierra la conexión:

cliente . detener ();

Serial . println ( F ( "cliente desconectado" ));

}

NeoPixModes ();

}

Temperature values ‚Äč‚Äčrecording

Record of temperature values

You‚Äôre going to need a badge Arduino MKR Zero, 100 nF capacitor, a 4.75 k ohm resistor, a temperature and humidity sensor, an insert plate, cables and a MicroSD card. With this project you work to keep a record of the temperature and humidity values ‚Äč‚Äčthat your device registers.

You will have to assemble the Arduino with the breadboard, then the temperature and humidity sensor with the breadboard, after this you will have to connect the power pin of the sensor to the VCC pin and finally connect the sensor data pin with pin7. When you finish you must bring the ground pin that has the humidity and temperature sensor to the pin GND from the plate Arduino. Next, you will connect the capacitor with the GND and the resistance.

Once you finish you must enter these codes:

#include <SD.h>

#include <RTCZero.h>

#include <DHT.h>

#define DHTPIN 7

#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

const int chipSelect = SS1;

unsigned long previousTime;

int loadDataCheck;

RTCZero rtc;

const byte seconds = 50;

const byte minutes = 44;

const byte hours = 17;

const byte day = 1;

const byte month = 9;

const byte year = 16;

void setup() {

pinMode(LED_BUILTIN, OUTPUT);

begin(9600);

println("DataLogger Example:");

if (!SD.begin(chipSelect)) {

println("Card failed, or not present");

return;

}

println("card initialized.");

//When power is supplied to the DHT22 sensor,

//don't send any instruction to the sensor

//within one second to pass unstable status

delay(1000);

println("Initializing DHT");

begin();

println("Initializing RTC");

begin();

setTime(hours, minutes, seconds);

setDate(day, month, year);

setAlarmTime(0, 0, 0);

enableAlarm(rtc.MATCH_SS);

attachInterrupt(dataCheck);

loadDataCheck=0;

previousTime=millis();

println("System ready...");

}

void loop() {

unsigned long currentTime=millis();

if ((currentTime-previousTime)>5000)

{

digitalWrite(LED_BUILTIN, HIGH);

delay(100);

digitalWrite(LED_BUILTIN, LOW);

previousTime=millis();

}

if (loadDataCheck) logData();

}

void dataCheck(){

loadDataCheck=1;

}

void logData(void) {

float humidity = dht.readHumidity();

float temperature = dht.readTemperature();

String dataString = "";

dataString += "Temperature: " + String(temperature) + " C" + "t" + "Humidity: " + String(humidity) + "%t" + "Time: " + getTime();

File dataFile = SD.open("datalog.txt", FILE_WRITE);

// if the file is available, write to it:

if (dataFile) {

println(dataString);

close();

// print to the Serial port too:

println(dataString);

}

String getTime(void) {

String returnString = "";

if (rtc.getHours() < 10)

returnString += "0" + String(rtc.getHours());

else

returnString += String(rtc.getHours());

returnString += ":";

if (rtc.getMinutes() < 10)

returnString += "0" + String(rtc.getMinutes());

else

returnString += String(rtc.getMinutes());

returnString += ":";

if (rtc.getSeconds() < 10)

returnString += "0" + String(rtc.getSeconds());

else

returnString += String(rtc.getSeconds());

return returnString;

}

Arduino Zero Robot

Arduino Zero Robot

You can create a robot with an Arduino board. For this you will need an adapter Arduino MKR2UNO, an Arduino MotorShield Rev3 board, a DC motor, cables and a battery of 9V. When you have these materials you will have to assemble them by gluing the motor and then making the connections indicated by the pieces.

Next, you will have to enter these codes:

#include <SPI.h>

#include <WiFi101.h>

#include <WiFiMDNSResponder.h>

#include "arduino_secrets.h"

char ssid[] = SECRET_SSID;

char pass[] = SECRET_PASS;

int keyIndex = 0;

char mdnsName[] = "WiFiRobot";

int status = WL_IDLE_STATUS;

WiFiServer server(80);

String readString;

const int pinDirA = 12;

const int pinDirB = 0;

const int pinPwmA = 3;

const int pinPwmB = 11;

const int pinBrakeA = 9;

const int pinBrakeB = 8;

const int motorSpeed = 200;

const int stepsDelay = 500;

void setup() {

pinMode(pinDirA, OUTPUT);

pinMode(pinPwmA, OUTPUT);

pinMode(pinBrakeA, OUTPUT);

pinMode(pinDirB, OUTPUT);

pinMode(pinPwmB, OUTPUT);

pinMode(pinBrakeB, OUTPUT);

brake();

begin(9600);

if (WiFi.status() == WL_NO_SHIELD) {

println("WiFi shield not present");

// don't continue:

while (true);

}

while ( status != WL_CONNECTED) {

print("Attempting to connect to SSID: ");

println(ssid);

status = WiFi.begin(ssid, pass);

delay(10000);

}

printWiFiStatus();

begin();

if (!mdnsResponder.begin(mdnsName)) {

println("Failed to start MDNS responder!");

while (1);

}

print("Server listening at http://");

print(mdnsName);

println(".local/");

println();

}

void loop() {

poll();

WiFiClient client = server.available();

if (client) {

println("new client");

boolean currentLineIsBlank = true;

while (client.connected()) {

if (client.available()) {

char c = client.read();

readString += c;

write(c);

if (c == 'n' && currentLineIsBlank) {

// send a standard http response header

println("HTTP/1.1 200 OK");

println("Content-Type: text/html");

println("Connection: close");

//client.println("Refresh: 5");

println();

println("<!DOCTYPE HTML>");

println("<head><title>WiFi Robot</title></head>");

println("<center><hr/><p> Click the Buttons to move the robot <p/><hr/></center>");

println("<center><input type=button value="GO UP" onmousedown=location.href="https://internetpasoapaso.com/?GO_UP"></center><br/>");

println("<center><left><input type=button value="GO LEFT" onmousedown=location.href="/?GO_LEFT"><input type=button value="GO RIGHT" onmousedown=location.href="/?GO_RIGHT"></center><br/>");

println("<center><input type=button value="GO DOWN" onmousedown=location.href="/?GO_DOWN"></right></center><br/><br/>");

println("<hr/>");

println("</body>");

println("</html>");

break;

}

if (c == 'n') {

currentLineIsBlank = true;

}

else if (c != 'r') {

currentLineIsBlank = false;

}

}

}

delay(1);

stop();

if (readString.indexOf("https://internetpasoapaso.com/?GO_UP") > 0) {

println();

println("UP");

println();

goUp();

}

if (readString.indexOf("/?GO_DOWN") > 0) {

println();

println("DOWN");

println();

goDown();

}

if (readString.indexOf("/?GO_LEFT") > 0) {

println();

println("LEFT");

println();

goLeft();

}

if (readString.indexOf("/?GO_RIGHT") > 0) {

println();

println("RIGHT");

println();

goRight();

}

readString = "";

println("client disconnected");

}

}

void printWiFiStatus() {

print("SSID: ");

println(WiFi.SSID());

IPAddress ip = WiFi.localIP();

print("IP Address: ");

println(ip);

long rssi = WiFi.RSSI();

print("signal strength (RSSI):");

print(rssi);

println(" dBm");

}

void goDown(void) {

motorAforward();

motorBforward();

delay(stepsDelay);

brake();

}

void goUp(void) {

motorBbackward();

motorBbackward();

delay(stepsDelay);

brake();

}

void goLeft(void) {

motorAforward();

motorBbackward();

delay(2*stepsDelay);

brake();

}

void goRight(void) {

motorBforward();

motorAbackward();

delay(2*stepsDelay);

brake();

}

void motorAforward(void) {

digitalWrite(pinDirA, HIGH);

digitalWrite(pinBrakeA, LOW);

analogWrite(pinPwmA, motorSpeed);

}

void motorAbackward(void) {

digitalWrite(pinDirA, LOW);

digitalWrite(pinBrakeA, LOW);

analogWrite(pinPwmA, motorSpeed);

}

void motorBforward(void) {

digitalWrite(pinDirB, HIGH);

digitalWrite(pinBrakeB, LOW);

analogWrite(pinPwmB, motorSpeed);

}

void motorBbackward(void) {

digitalWrite(pinDirB, LOW);

digitalWrite(pinBrakeB, LOW);

analogWrite(pinPwmB, motorSpeed);

}

void brake(void) {

digitalWrite(pinBrakeA, HIGH);

digitalWrite(pinBrakeB, HIGH);

}

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will surely be of great help to more members of the community. Thank you! ūüėČ

Felix Bathrobe

Author: Félix Albornoz

I have been working in the technology sector for more than 20 years helping companies and users to develop and train in this field. Always learning new things.

You may be interested:

Leave a Comment