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
main.cpp
- Committer:
- pelissier_rascol
- Date:
- 2020-09-09
- Revision:
- 31:adfe162a58a4
- Parent:
- 30:0027d243841b
File content as of revision 31:adfe162a58a4:
#include "mbed.h" // c'est la bibliothèque DigitalOut LEDB(LED3); DigitalOut LEDR(LED1); DigitalOut LEDV(LED2); BusIn nibble(D3,PTA4,PTC6); int main() { while(1) { // c'est la boucle switch(nibble) { case 0b110: LEDB=1;LEDR=1;LEDV=1;; break; // p5 and p6 are 1 case 0b010: LEDB=0;LEDR=1;LEDV=1;; break; case 0b100: LEDB=1;LEDR=1;LEDV=0;; break; case 0b000: LEDB=1;LEDR=0;LEDV=1;; break; case 0b111: LEDB=0;LEDR=1;LEDV=0;; break; case 0b011: LEDB=0;LEDR=0;LEDV=1;; break; case 0b101: LEDB=1;LEDR=0;LEDV=0;; break; case 0b001: LEDB=0;LEDR=0;LEDV=0;; break; } } // fin boucle infinie } // fin programme