Arduino Zero: What is it, what is it used for, and what development projects can it be used in?

Last update: 15/09/2022
Arduino Zero: What it is, what it's used for, and what development projects it can be used in.

The Arduino ZERO board It is designed for those users who They execute projects that they cannot support the classic Arduino UNOThis is due to the processing capacity of the MCU, the flash memory, and the CPU clock.

Therefore, it is important that you know what Arduino ZERO boards are and what these boards are used for in electronics. You can find this information in the paragraphs of this article.

Also, we will show you The main features of the board and the criteria you should consider when working with Arduino ZEROCheck out this powerful motherboard.

What are Arduino Zero boards and what are these development boards used for in electronics?

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

It has all the necessary technology to working on Internet of Things projectsIt is necessary to clarify that its performance is slightly lower than that of other boards, since The voltage it supports is 3.3VAll pins, except pin 4, They work with external interruptions 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 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 of this Arduino board are: 

  • It's ideal for working in robotics, in automation and in technology projects.
  • It has a embedded scrubber that connects to the hardware of MCU which allows you to program the SAMD21 through an interface SWD. This also allows full access to the microcontroller and the ability to work with program codes to modify them.
  • The external power supply that Arduino ZERO has Power is supplied via a center-positive connector or through the GND and VIN pins located on the header of this 2,1 mm connector. This means 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 are in A0 to A5The output voltage is at the DAC, which is channel A0.
  • The SPI is located in SS, MOSI, MISO and SCK of the plate.
  • He owns a working watch. 48 MHz, so you can count real time and the calendar.

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 board Arduino ZERO operates at a voltage of 3.3VIt's slightly lower than the other motherboards. Therefore, you must take this restriction into account because you could damage the microprocessor and other components. When You work in the IDE and you open the monitorThe microcontrollers and the sketch execution do not restart, so you will need to restart the process using a button found on the software dashboard. arduino.

Power is not supplied via a USB inputThis could complicate the project if you want to use the 2,1mm connector for another circuit connection. Finally, You must be careful about the number of processes you attribute to the project.While it is true that this motherboard is far superior in power to the UNO Arduino And if you have a powerful microcontroller, good memory, and a 48 MHz clock, you should always be mindful of the load you transfer to it.

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

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

NeoPixel display controlled by WiFi

NeoPixel display controlled by WiFi

With this project you will be able to create a screen of NeoPixel managed by WiFi. You're going to need one Arduino ZERO boardYou will need a NeoPixel-type ring light, several LEDs, a breadboard, a 1000 µF capacitor, a 475 ohm resistor, and wires for making the connections. You will have to assemble it yourself. following the descriptions and specifications of the parts And considering the pins on the board, in accordance with everything we've discussed in this post.

Once you have the assembly ready, you will need to enter the following code:

#include #include #define PIN 12 #define NUMPIXELS 10 #define interval 50 #define wifiRetryTimes 0 Adafruit_NeoPixel pixels = Adafruit_NeoPixel ( NUMPIXELS , PIN , NEO_GRB + NEO_KHZ800 ); uint32_t red = pixels . Color ( 255 , 0 , 0 ); uint32_t blue = pixels . Color ( 0 , 0 , 255 ); uint32_t green = pixels . 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 ); IP Address gw ( 192 , 168 , 0 , 1 ); dns IP Address ( 192 , 168 , 0 , 1 ); string IP ; char APssid [] = "MKR1000" ; char APpass [] = "MKR1000" ; char ssid [] = "YourSSID" ; char pass [] = "YourPassword" ; int keyIndex = 0 ; int status = WL_IDLE_STATUS ; WiFiServer Server ( 80 ); const char html1 [] PROGMEM = "<! DOCTYPE html>  Neopixel Color Picker < / title > " " < style type = 'text / css' >. bt {display: block; width: 250px; height: 100px; padding: 10px; margin: 10px; text-align: center; border-radius: 5px; colour: white; font-weight: bold; font-size: 40px; text-decoration: none;} body {background: #000;} " ".red {background: red; color: white;}. green {background: # 0C0; color: white;}. blue {background: blue; color: white;}" ".white {background: white; color: black; border: 1px solid black;}. off {background: # 666; color: white;}. colorPicker {background: white; color: black;}. colorWipe {font-size: 40px; background: linear-gradient(right, red, #0C0, blue);} " ".theatreChase {font-size: 40px; background: linear-gradient(right, red, black, red, black, #0C0, black, #0C0, black, blue, black, blue);}" ".rainbow {font-size: 40px; background: red; background: linear-gradient(right, red, orange, yellow, green, blue, indigo, violet, red, orange, yellow, green, blue, indigo, violet) );} " ".rainbowCycle {font-size: 40px; background: red; background: linear-gradient(right, red, orange, yellow, green, blue, indigo, violet);}" ".rainbowChase {font-size: 40px; background: red; background: linear gradient (to the right, red, black, orange, black, yellow, black, green, black, blue, black, indigo, black, violet); } " ; const char html2 [] PROGMEM = ".breathe {background: blue; color: white;}. cylon {background: red; color: black;}. heartbeat {background: red; color: white;}. CHRISTMAS {font size: 40px; background: red; background: linear gradient (right, red, green, red, green, red, green, red, green, red, green, red, green);} " ".ALL {background: white; color: blue;}. And {background: #EE0; height: 100px; width: 100px; border radius: 50px;}. B { background: #000; height: 100px; width: 100px; border-radius: 50px;}. A {font-size: 35px;} td {vertical-align: middle;} " "td {vertical-align: middle;} " " " ;

const char  html3 []  PROGMEM  =

"función ResetWebpage () {if (window.location.href! = 'http: // # IPADDRESS /') {window.open ('http: // # IPADDRESS /', '_ self', true)}};" // change the website value here to your static website "function myFunction () {document.getElementById ('brilloLevel'). submit();} " " v = 1 '> Red Color Wipe " " Green Theatre Chase " " Blue Rainbow " " White Rainbow Chase " ; const char html4 [] PROGMEM = " Cylon Chaser Rainbow Cycle " " Breathe Heartbeat " " Christmas ALL Cycle " " Deactivated  " " " ; 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}; //Activate Neopixel Function (off by default) int neopixMode = 0; long previousMillis = 0 ; long lastAllCycle = 0 ; long previousColorMillis = 0 ; int i = 0 ; int vent = 0 ; int beat = 0 ; ; uint32_t lastAllColor = 0 ; empty configuration () { pixels . start(); pixels . setBrightness (brightness); writeLEDS ( 0 , 0 , 0 ); Serial. begin ( 9600 ); Serial . println ( ssid ); if ( WiFi . status () == WL_NO_SHIELD ) { Serial . println(F("WiFi shield not present")); while(true); } WiFi. config ( apIP ); //WiFi.config(apIP, dns, gw, netMsk); while ( status ! = WL_CONNECTED ) { for ( int x = 0 ; x <= wifiRetryTimes ; x ++ ) { Serial . print(F("Attempting to connect to the network named:")); Serial. println ( ssid ); } Serial . print(F("Could not connect to Wifi")); state = WiFi. beginAP (APssid); // create an AP - IP is currently static at 192.168.1.1 // state = WiFi.beginAP(APssid, APpass); delay ( 10000 ); break ; } printWifiStatus (); sendHtml3 . replace ( "#IPADDRESS" , IP ); sendHtml4 . replace("#BRIGHT", "150"); Serial. println(F("USP Server Started!!" )); server . begin(); Serial . println(F("HTTP server started!!" )); } empty loop () { WiFiClient Client = server . available (); if ( client ) { println(F("new client")); currentLine = ""; while (client.connected()) { if (client.available()) { char c = client.read(); Serial. write ( c ); if ( c == '\ n' ) { client . println("Content type: text/html"); client. println(); client. print(F(html1)); customer . print(F(html2)); customer . print (sendHtml3); customer . print (sendHtml4); customer . println(); break; } else { // if it has a new line, you'll have to delete currentLine: if (currentLine. indexOf ( "Referer" ) < 0 ) { // always performs if Referer is not in the returned value if ( currentLine . indexOf("/L00") > 0) { // if /L00 is present in the string handle_L00(); // execute the function } 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 ( "bright" ) > 0 ) { handle_bright (); } } currentLine = "" ; } } else if ( c ! = '\r' ) currentLine + = c ; } if ( currentLine . endsWith("/generate_204")) { handle_root(); } } } // closes the connection: client. stop(); Serial . println(F("client disconnected")); } NeoPixModes(); }

Recording of temperature values

Recording of temperature values

You're going to need a plate Arduino MKR Zero, a 100 nF capacitor, a 4.75 k ohm resistor, a temperature and humidity sensor, an insert board, cables, and a MicroSD card. This project works to keep a record of the temperature and humidity values ​​recorded by your device.

You will have to assemble the Arduino with the breadboardNext, connect the temperature and humidity sensor to the breadboard. After this, you will need to connect the sensor's power pin. to the VCC pin and finally connect the sensor's data pin to pin 7When you finish, you will need to connect the ground pin of the humidity and temperature sensor to the pin GND from the plate arduino. Next, you will connect the capacitor to the GND and endurance.

Once you're finished, you'll need to enter these codes:

#include #include #include #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 bytehours = 17; const byteday = 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 instructions 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 boardFor this you will need an adapter Arduino MKR2UNOan Arduino MotorShield Rev3 board, a DC motor, wires, and a battery 9V. Once you have these materials, you will have to assemble them by gluing the motor and then making the connections indicated on the parts.

Next, you will need 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='/?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("/?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);

}
Ebooks of IPAP
Ebooks IPAP

🔥JOIN🔥 THE NEW IP@P COMMUNITY! SIGN UP HERE!

Themes

Author: Félix Albornoz

I have over 20 years of experience working in the technology sector, helping companies and users develop and train in this field. I'm always learning new things.

Related