Materiel

Arduino DUE Wat is het, waar is het voor en welke apparaten kan ik met deze boards ontwikkelen?

Een van de krachtigste kaarten in de aanbieding Arduino is de DUE-versie . Dankzij de microcontroller, het geheugen en het aantal pinnen dat het heeft, is het een van de meest gewilde wanneer complexe projecten nodig zijn.

Om deze reden, we hebben dit artikel opgesteld zodat u weet waar dit type plaat voor is en wat de belangrijkste kenmerken zijn die het aan gebruikers aanbiedt.

Daarnaast leggen we je uit waar je rekening mee moet houden hoe verschilt de ontwikkelomgeving bij het werken met een Arduino DUE voor het programmeren van het bord? . Uitchecken.

Wat is Arduino DUE en waar zijn deze gratis ontwikkelborden voor?

Arduino-DUE is een kaart uitgerust met een Atmel SAM3X8E microcontroller, het leveren van extra prestaties voor grote projecten . Dit criterium wordt ook ondersteund door een groter aantal broches in- en uitstappen digitaal en analoge pinnen . Het werkt met een spanning van 3,3 V en heeft 4 poorten voor materiaal, waarvan 2 voor kabels MicroUSB gebruikt om de kaart op de computer aan te sluiten. U kunt Arduino DUE-besturingssystemen gebruiken Windows, Linux et MacOS .

Kenmerken van de Arduino DUE Wat zijn de meest interessante kenmerken?

De belangrijkste kenmerken van Arduino DUE zijn:

  • De afmetingen zijn: 101,52 × 53,3 mm en het gewicht is 36 gram.
  • Het heeft een 32-bits kern Atmel SAM3X8E ARM Cortex-M3 MCU die werkt op 84 Mhz.
  • Het heeft een passief geheugen 96 KB SRAM , maar het heeft geen EEPROM-type geheugen zoals de rest van de Arduino-kaarten. Terwijl het flashgeheugen 512 KB is.
  • De spanning waarmee het werkt is 3V , met een maximale instaplimiet van 16V .
  • Hij heeft 54 digitale pinnen , waarvan 12 voor 12 zijn voor pulsmodulatie.
  • de pinnen van analoge ingangen zijn 12 en broches bedrijfs uitje sont 2.
  • Hij heeft 2 MicroUSB-poorten , An JTAG, van un SPI, van deux reset- en verwijderknoppen TWEE .

Waar moet je op letten bij het werken met een Arduino DUE-bord?

Het eerste dat u in gedachten moet houden, is dat dit bord werkt met een stroom van 3,3 V , dus het behoudt een groot verschil met de meeste 5V Arduino's. Daarom moet u oppassen dat u de MCU, geheugens en andere componenten niet doorbrandt als gevolg van een stroomstoot.

Een ander probleem om op te letten, zij het iets minder, is de grootte en het gewicht. Eindelijk, je moet rekening houden met alle digitale en analoge pinnen die je hebt (hiermee bedoelen we de noodzaak van uw project om hou iedereen bezig, want als er minder nodig is kan je voor een andere goedkopere 5V kaart gaan ).

Is de ontwikkelomgeving (Arduino IDE) anders voor Arduino DUE-boards?

“UPDATE ✅ Wil je meer weten over Arduino DUE silvers en hoe je ermee kunt werken? ⭐ VOER HIER IN ⭐ en leer alles ✅ FROM SCRATCH ✅ »

de Arduino DUE-omgeving is niet anders dan de rest van de borden, het is je moet er alleen rekening mee houden dat de IDE is geconfigureerd voor Arduino UNO-bord , dus u moet het type . wijzigen Arduino op het programma.

Daarvoor moet je deze stappen volgen:

  • Zodra je de EDI Open, ga erin outils .
  • Selecteer vervolgens Plaquettes .
  • Kies de optie TWO .

Nut van de kaart In welke projecten kan de Arduino DUE worden gebruikt?

La Arduino DUE-bord kan worden gebruikt in een groot aantal projecten .

U kunt bijvoorbeeld maken:

  • een pedaal om het geluid van een elektrische gitaar te vervormen.https://create.arduino.cc/projecthub/electrosmash-team/arduino-due-programmable-guitar-pedal-edfe8b
  • inrichting bereiken elektrocardiogrammen. https://create.arduino.cc/projecthub/javiergonzalezb/heart-rate-estimation-using-arduino-due-a2271a
  • Generator golfvormen.https://create.arduino.cc/projecthub/search?q=due&type=Project

De plus, als je een project in detail wilt weten, kun je een set nullen en kruisjes maken . Voor dit apparaat heb je een DUE-bord, 2,8 inch TFT LCD-controller of LED-display met touchscreen en kabels nodig voor installatie.

Wat de montage betreft, moet u dit doen volgens de volgende tekening:

Als je klaar bent, moet je de Arduino IDE invoeren en deze codes schrijven:

#include

#include


#include


#include


#include


#defineTFT_RST 8


#definieer TFT_DC 9


#defineTFT_CS 10


#define TOUCH_ORIENTATION LANDSCHAP


Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);


Knoppen Adafruit_GFX_Button [9];


URTouch myTouch (30, 28, 26, 24, 22);


korte ongetekende int bewegingen = 1;


winnaar unsigned short int = 0;


niet-ondertekende korte int x, y;


niet-ondertekende korte int-cursor;


unsigned short int firstMoves[] = {0, 2, 6, 8};


unsigned short int board [] = {0, 0, 0, 0, 0, 0, 0, 0, 0};


booleaanse speler;


bool b = 1;


char start [10] = {"Gamestart"};


char you [4] = {"JIJ"};


char cpu [4] = {"CPU"};


char opnieuw [7] = {"Opnieuw?"
};


cirkel zonder teken const [] PROGMEM = {


0 b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0 , 0x0, 0x0, 0x0, 0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0.0x0,


0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xF8, 0x0, 0x0 0x0, 0x0, 0x0, 0x0,0x0,0x7f, 0xff, 0x80,0x0,0x0,0x0,0x0,0x0,0x3,0xff, 0xff, 0xf0,0x0,0x0,0x0,


0x0, 0x0, 0xf, 0xff, 0xff, 0xFC, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xF0, 0x3, 0xff 0x0, 0x0, 0x0, 0x0,0xff, 0x80,0x0,0x7f, 0xc0,0x0,0x0,0x0,0x1,0xfe, 0x0,0x0,0x1f, 0xe0,0x0,0x0,


0x0, 0x3, 0xF8, 0x0, 0x0, 0x7, 0xF0, 0x0, 0x0, 0x0, 0x7, 0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0, 0x0, 0x0, 0x0, 0x0


};


lege parameter () {


mijnTouch.
InitTouch();


mijnTouch.
setPrecision(PREC_HI);


tft.
begin ();


tft.
setRotatie (3);


tft.
fillScreen(ILI9341_BLACK);


// Teken een wit kader


tft.
drawRect(0, 0, 320, 240, ILI9341_WHITE);


// Druk de tekst "Arduino" af


tft.
setCursor(80, 30);


tft.
setTextColor(ILI9341_GREEN);


tft.
setTextGrootte (4);


tft.
afdrukken ("Arduino");


// Print de tekst "Tic Tac Toe"


tft.
setCursor(30, 100);


tft.
setTextColor(ILI9341_WHITE);


tft.
setTextGrootte (4);


tft.
afdrukken ("Tic Tac Toe");


// Maak een rode knop


// maak knoppen


[0] knoppen.
initButton (& tft, 160, 200, 200, 40, ILI9341_WHITE, ILI9341_RED, ILI9341_WHITE,


begin, 2);


[0] knoppen.
drawKnop ();


doen {


wacht op een druk op (& x, & y);


ja (knoppen [0]. bevat (x, y))


b=0;


} terwijl (b> 0);


}


lege lus ()


{


for (unsigned short int i = 0; i <9; i ++)


{


bord [i] = 0;


}


tft.
fillScreen(ILI9341_BLACK);


// Teken een wit kader


tft.
drawRect(0, 0, 320, 240, ILI9341_WHITE);


// Print de tekst "Tic Tac Toe"


tft.
setCursor(30, 30);


tft.
setTextColor(ILI9341_WHITE);


tft.
setTextGrootte (4);


tft.
afdrukken ("Tic Tac Toe");


// Afdrukken "YouTube!"
teksten


tft.
setCursor(30, 100);


tft.
setTextColor(ILI9341_GREEN);


tft.
setTextGrootte (4);


tft.
print ("Wie begint");


// Maak een rode knop


// maak knoppen


[0] knoppen.
initButton (& tft, 100, 200, 80, 40, ILI9341_WHITE, ILI9341_RED, ILI9341_WHITE,


jij 2);


[0] knoppen.
drawKnop ();


// maak knoppen // x, y, w, h, omtrek, opvulling, tekst


[1] knoppen.
initButton (& tft, 200, 200, 80, 40, ILI9341_WHITE, ILI9341_RED, ILI9341_WHITE,


processor, 2);


[1] knoppen.
drawKnop ();


b=1;


doen {


wacht op een druk op (& x, & y);


ja (knoppen [0]. bevat (x, y))


{


b=0;


speler = 1;


tft.
fillScreen(ILI9341_BLACK);


// Teken een wit kader


tft.
drawRect(0, 0, 320, 240, ILI9341_WHITE);


tft.
setCursor(30, 30);


tft.
setTextColor(ILI9341_WHITE);


tft.
setTextGrootte (2);


tft.
print ("Ok, je begint");


vertraging (2000);


}


ja (knoppen [1]. bevat (x, y))


{


b=0;


speler = 0;


tft.
fillScreen(ILI9341_BLACK);


// Teken een wit kader


tft.
drawRect(0, 0, 320, 240, ILI9341_WHITE);


tft.
setCursor(30, 30);


tft.
setTextColor(ILI9341_WHITE);


tft.
setTextGrootte (2);


tft.
print ("Ok, de CPU start");


vertraging (2000);


}


} terwijl (b> 0);


b=1;


bewegingen = 1;


winnaar = 0;


cursor = 10;


tft.
fillScreen(ILI9341_BLACK);


// Teken een kader


tft.
drawRect(0, 0, 320, 240, ILI9341_WHITE);


// Teken een verticale lijn


tft.
fillRect(80, 15, 5, 205, ILI9341_WHITE);


tft.
fillRect(150, 15, 5, 205, ILI9341_WHITE);


// Teken een horizontale lijn


fillRect(15,80,205,5,ILI9341_WHITE);


fillRect (15, ILI150_WHITE);


drawRect(230, 10, 80, 220, ILI9341_WHITE);


{


faire


{


if (zet% 2 == 1 && speler == false || zet% 2 == 0 && speler == waar)


{


cursor + = 10;


setCursor (240, cursor);


setTextGrootte (1);


println ("ik teken");


arduinoMove();


checkWinnaar ();


} andere


{


cursor + = 10;


setCursor (240, cursor);


setTextGrootte (1);


println ("Uw zet");


spelerVerplaats ();


checkWinnaar ();


}


vertraging (1000);


beweegt ++;


} while (winnaar == 0 && zet <10);


waitonetouch (& x, & y);


fillScreen(ILI9341_BLACK);


// Teken een kader


drawRect(0,0,320,240, ILI9341_WHITE);


// Druk de tekst "Game Over" af


setCursor (50,30);


setTextColor(ILI9341_WHITE);


setTextGrootte (4);


afdrukken ("GAME OVER");


als (winnaar == 0)


{


// Print "TEKENEN!"
teksten


setCursor (110,100);


setTextColor(ILI9341_YELLOW);


setTextGrootte (4);


afdrukken ("DRAW");


}


als (winnaar == 1)


{


// Afdrukken "MENSELIJKE WINT!"
teksten


setCursor (40,100);


setTextColor(ILI9341_BLUE);


setTextGrootte (4);


afdrukken ("MENSELIJK WINT");


}


als (winnaar == 2)


{


// Toont "CPU WINS!"
teksten


setCursor (60,100);


setTextColor(ILI9341_RED);


setTextGrootte (4);


afdrukken ("CPU WINS");


}


knoppen [0] .initButton (& tft, 160,200,200,40, ILI9341_WHITE, ILI9341_RED, ILI9341_WHITE,


nogmaals, 2);


knoppen [0] .drawButton ();


doen{


waitonetouch (& x, & y);


if (knoppen [0] .bevat (x, y))


b=0;


} terwijl (b> 0);


}


}


void playerVerplaatsen ()


{


waitonetouch (& x, & y);

Vergelijkbare items

Laat een reactie achter

Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

Terug naar boven knop