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.
Revision 0:4e3e179f4c8e, committed 2017-03-03
- Comitter:
- eencae
- Date:
- Fri Mar 03 15:10:14 2017 +0000
- Commit message:
- minor formatting
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ShiftReg.lib Fri Mar 03 15:10:14 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/eencae/code/ShiftReg/#33b34e0ed72c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 03 15:10:14 2017 +0000 @@ -0,0 +1,33 @@ +/* ELEC1620 Application Board Example + +Shift Register + +(c) Dr Craig A. Evans, University of Leeds, Feb 2017 + +*/ + +#include "mbed.h" +#include "ShiftReg.h" // include ShiftReg library + +ShiftReg shift; // create ShiftReg object + +int main() +{ + // values for 0 - 9 in hex + int seven_seg_array [] = { + 0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x67 + }; + + // write 0 to 7-seg to turn it off + shift.write(0x00); + + while(1) { + + // loop through the array + for(int i = 0; i < 10; i++) { + shift.write(seven_seg_array[i]); + wait(0.5); + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 03 15:10:14 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/ef9c61f8c49f \ No newline at end of file