Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Homepage
============================================================================== FabLab Nîmes Initiation à la Programmation Auteur : Frédéric Giamarchi
Date : 28 oct 2021 TP 01 : Controle de 3 DELs en même temps 3 Dels (Rouge, Verte et Bleu) clignotent à 3 fréquences différentes (1Hz, 2Hz et 4Hz). ==============================================================================
- include "mbed.h"
Déclaration du sens des broches
DigitalOut DEL_VE(PB_0); Ligne PB_0 sur la carte Nucléo DigitalOut DEL_RO(PB_7); Ligne PB_7 sur la carte Nucléo DigitalOut DEL_BL(PB_6); Ligne PB_6 sur la carte Nucléo
============================================================================== Début du Programme int main() Fonction principale {
============================================================================== while(1) Boucle Infinie { DEL_VE = 1; Broche à 1 (DEL allumée) DEL_RO = 1; Broche à 1 (DEL allumée) DEL_BL = 1; Broche à 1 (DEL allumée) wait_ms(100); Temporisation de 100ms (0.1s) DEL_VE = 0; Broche à 0 (DEL éteinte) DEL_RO = 0; Broche à 0 (DEL éteinte) DEL_BL = 0; Broche à 0 (DEL éteinte) wait_ms(150); DEL_BL = 1; Broche à 1 (DEL allumée) wait_ms(100); DEL_BL = 0; Broche à 0 (DEL éteinte) wait_ms(150); DEL_VE = 1; Broche à 1 (DEL allumée) DEL_BL = 1; Broche à 1 (DEL allumée) wait_ms(100); DEL_VE = 0; Broche à 0 (DEL éteinte) DEL_BL = 0; Broche à 0 (DEL éteinte) wait_ms(150); DEL_BL = 1; Broche à 1 (DEL allumée) wait_ms(100); DEL_BL = 0; Broche à 0 (DEL éteinte)
} Fin du while(1) ============================================================================== } Fin du Programme ==============================================================================