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.
main.cpp
- Committer:
- julianlab
- Date:
- 2015-08-15
- Revision:
- 1:28c8eafa0fe3
- Parent:
- 0:07d7b63cd4af
- Child:
- 2:5c81e1847ccd
File content as of revision 1:28c8eafa0fe3:
#include "mbed.h" AnalogIn potValue(PA_0); BusOut leds(D2, D3, D4, D5, D6, D7, D8, D9, D10, D11); int main() { int bitmask = 0x3ff; while(1) { int sensor_value = (int) (potValue.read() * 10); leds = ~(bitmask << sensor_value); wait(0.1); } }