ReadyDev
... # Ouvrir le lien de téléchargement https://www.arduino.cc/en/software # Télécharger l'éditeur Software > Download options > Windows win 10 and never, 64 bits Just Download > Just Download ...
... # Démarrer l'installation Double clic > arduino-ide_2.3.4_Windows_64bit.exe > J'accepte Juste pour moi (admins) > Suivant Dossier d'installation > C:\Users\admins\AppData\Local\Programs\Arduino IDE Cocher > Lancer Arduino IDE Installer > Fermer # Installer les extensions Autoriser > Autoriser Oui > Installer > Installer > Installer > Installer Oui ...
... # Ouvrir le lien de téléchargement https://www.labcenter.com/ # Télécharger le simulateur Circuit Simulation Software > Download Now Download Proteus Professional Demonstration Email > youremail@domain.com Cocher > Receive our demo resource mailchimp emails Submit ... # Aller dans la boite email # Démarrer le téléchargement Cliquer sur le bouton > Proteus Demo Download ...
... # Démarrer l'installation du simulateur Double clic > prodemo.exe > Oui > Next Cocher > I accept the terms of this agreement > Next > Typical Run Proteus 8 Demonstration ...
... # Ouvrir le lien de téléchargement https://goalmdcat.com/arduino-uno-library-for-proteus/ # Télécharger la librairie Download Arduino UNO Library for Proteus ...
... # Copier les librairies Arduino Copier > ArduinoUnoTEP.LIB Copier > ArduinoUnoTEP.IDX # Coller dans le répertoire de librairies de Proteus Coller > C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA\LIBRARY ...
... # Ouvrir un nouveau croquis File > New Sketch # Enregistrer le croquis File > Save As Emplacement > v01 Nom du fichier > rdv_arduino Enregistrer ...
... # Sélectionner la carte Tools > Board > [nom-carte] > Arduino UNO ...
...
int LED_PIN = 13;
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
...... # Methode 1 # Formater le code source Tools > Auto Format ... # Methode 2 # Formater le code source Touche (Ctrl + T) ... # Methode 3 # Formater le code source [code-source] > Clic droit > Formater Document ...
... # Refactoriser un symbole [nom-symbole] > Clic droit > Change All Occurrences > [nom-symbole-new] ...
... # Ouvrir le menu des préférences File > Preferences # Activer la génération de fichier HEX Show verbose output during > Cocher > Compile ...
... # Compiler le projet Sketch > Verify/Compile ...
... # Identifier le fichier HEX Aller dans la sortie de la compilation > Identifier le fichier HEX Format du fichier HEX > [nom-projet.hex] ...
... # Ouvrir le menu nouveau projet File > New Project # Définir le nom du projet Name > rdv_arduino.pdsprj Path > v01 Cocher > New Project Next Cocher > Create a schematic from the selected template Cocher > DEFAULT Next Cocher > Do not create a PCB layout. Next Cocher > No Firmware Project Next Finish ...
... # Ouvrir le menu Pick Devices Schematic Capture > P # Ajouter les composants Keywords > ARDUINO UNO R3 > OK Keywords > LED-YELLOW > OK Keywords > RES > OK ...
... # Ouvrir les propriétés de la carte Arduino Schematic Capture > Arduino UNO R3 > Clic droit > Edit Properties # Charger le fichier HEX Program File > rdv_arduino.ino.hex OK ...
... # Configurer la taille des pas de la grille View > Snap 10th View > Snap 50th ...
... # Sélectionner l'outil d'édition de texte Cliquer sur le bouton > A (2D Graphics Text Mode) # Sélectionner la couleur du texte C > COMPONENT # Editer le texte Cliquer sur > [zone-edition] > Pour ouvrir le menu d'édition String > [editer-texte] Horizontal > Center Vertical > Middle Global Style > COMPONENT Height > 0.1in OK ...
... # Démarrer la simulation Cliquer sur le bouton > Run the simulation ...
...
int LED_PIN = 13;
void setup() {
LedFlash_Init();
}
void loop() {
LedFlash_Run();
}
void LedFlash_Init() {
pinMode(LED_PIN, OUTPUT);
}
void LedFlash_Run() {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
...... # Ouvrir le menu Tab Cliquer sur les 3 points (...) > New Tab # définir le nom du fichier Name for new file > rdv_led_flash.h > OK Name for new file > rdv_led_flash.cpp > OK ...
...
#include "rdv_led_flash.h"
void setup() {
LedFlash_Init();
}
void loop() {
LedFlash_Run();
}
...... #ifndef _rdv_led_flash_ #define _rdv_led_flash_ #include <Arduino.h> void LedFlash_Init(); void LedFlash_Run(); #endif ...
...
#include "rdv_led_flash.h"
int LED_PIN = 13;
void LedFlash_Init() {
pinMode(LED_PIN, OUTPUT);
}
void LedFlash_Run() {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
......
#include "rdv_led_flash.h"
cLedFlash oLedFlah(13, 500);
void setup() {
oLedFlah.init();
}
void loop() {
oLedFlah.run();
}
......
#ifndef _rdv_led_flash_
#define _rdv_led_flash_
#include <Arduino.h>
class cLedFlash {
public:
cLedFlash(int _led, int _delay_ms);
~cLedFlash();
void init();
void run();
private:
int m_led;
int m_delay_ms;
};
#endif
......
#include "rdv_led_flash.h"
cLedFlash::cLedFlash(int _led, int _delay_ms)
: m_led(_led),
m_delay_ms(_delay_ms) {
}
cLedFlash::~cLedFlash() {
}
void cLedFlash::init() {
pinMode(m_led, OUTPUT);
}
void cLedFlash::run() {
digitalWrite(m_led, HIGH);
delay(m_delay_ms);
digitalWrite(m_led, LOW);
delay(m_delay_ms);
}
......
#include "rdv_serial_port.h"
cSerialPort oSerialPort(9600);
void setup() {
oSerialPort.init();
oSerialPort.writeData("OK: Demarrage du systeme...");
}
void loop() {
}
......
#ifndef _rdv_serial_port_
#define _rdv_serial_port_
#include <Arduino.h>
#include <WString.h>
class cSerialPort {
public:
cSerialPort(int _bauds);
~cSerialPort();
void init();
void writeData(const String& _data);
private:
int m_bauds;
};
#endif
......
#include "rdv_serial_port.h"
cSerialPort::cSerialPort(int _bauds)
: m_bauds(_bauds) {
}
cSerialPort::~cSerialPort() {;
}
void cSerialPort::init() {
Serial.begin(m_bauds);
}
void cSerialPort::writeData(const String& _data) {
Serial.println(_data);
}
......
#include "rdv_serial_port.h"
cSerialPort oSerialPort(9600);
void setup() {
oSerialPort.init();
oSerialPort.writeData("OK: Demarrage du systeme...");
}
void loop() {
char oChar;
if (oSerialPort.readData(oChar)) {
if (oChar == 'a') {
oSerialPort.writeData("OK: Commande: " + String(oChar));
} else if (oChar == 'b') {
oSerialPort.writeData("OK: Commande: " + String(oChar));
} else {
oSerialPort.writeData("KO: Commande invalide: " + String(oChar));
}
}
}
......
#ifndef _rdv_serial_port_
#define _rdv_serial_port_
#include <Arduino.h>
#include <WString.h>
class cSerialPort {
public:
cSerialPort(int _bauds);
~cSerialPort();
void init();
void writeData(const String& _data);
boolean readData(char& _data);
boolean readData(String& _data);
private:
int m_bauds;
};
#endif
......
#include "rdv_serial_port.h"
cSerialPort::cSerialPort(int _bauds)
: m_bauds(_bauds) {
}
cSerialPort::~cSerialPort() {;
}
void cSerialPort::init() {
Serial.begin(m_bauds);
}
void cSerialPort::writeData(const String& _data) {
Serial.println(_data);
}
bool cSerialPort::readData(char& _data) {
if (Serial.available()) {
_data = Serial.read();
return true;
}
return false;
}
bool cSerialPort::readData(String& _data) {
if (Serial.available()) {
_data = Serial.readString();
return true;
}
return false;
}
...... # Ouvrir le lien de téléchargement https://eterlogic.com/Products.VSPE_Download.html # Télécharger VSPE Download VSPE 64 bit (x64) ...
... # Extraire le fichier compresser Extraire > SetupVSPE_64_1.5.1.191.zip # Démarrer l'installation Double clic > SetupVSPE_64.msi > Next Cocher > I accept the terms in the License Agreement Next Destination Folder > C:\Program Files\Eterlogic Software\Virtual Serial Ports Emulator (x64)\ Next > Installer > Oui Finsih ...
... # Ouvrir le menu type de port Device > Create new device # Sélection le type port Device type > Virtual Pair Suivant # Définir le nom des ports Virtual serial port 1 > COM1 Virtual serial port 2 > COM2 Terminer ...
... # Ouvrir le gestionnaire de périphériques Bouton Windows > Gestionnaire de périphériques # Vérifier les ports série virtuels créés Ports (COM et LPT) > Eterlogic Virtual Serial Port (COM1) Ports (COM et LPT) > Eterlogic Virtual Serial Port (COM2) ...
... # Ouvrir le menu Pick Devices Schematic Capture > P # Ajouter un composant Arduino Keywords > COMPIM > OK ...
... # Ouvrir les propriétés du port série Schematic Capture > COMPIM > Clic droit > Edit Properties # Configurer le port série Pysical Port > COM1 Pysical Baud Rate > 9600 Virtual Baud Rate > 9600 Terminer ...
... # Ouvrir le lien de téléchargement https://sourceforge.net/projects/realterm/files/ # Télécharger le terminal Download Last Version ...
... # Démarrer l'installation Double clic > Realterm_2.0.0.70_Signed_Wrapper_setup.exe > Oui Next > Next Destination Folder > C:\Program Files (x86)\BEL\Realterm\ Next > Install > Finish ...
... # Configurer le port série Port > Baud > 9600 Port > Port > 2=\VSPE_SERIAL2 # Charger la configuration Port > Open > Open > Change ...
...
#include "rdv_serial_port.h"
cSerialPort oSerialPort(9600);
void setup() {
oSerialPort.init();
oSerialPort.writeData("OK: Demarrage du systeme...");
}
void loop() {
char oChar;
if (oSerialPort.readData(oChar)) {
if (oChar == 'a') {
oSerialPort.writeData("OK: Commande: " + String(oChar));
} else if (oChar == 'b') {
oSerialPort.writeData("OK: Commande: " + String(oChar));
} else {
oSerialPort.writeData("KO: Commande invalide: " + String(oChar));
}
}
}
...