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
00001 /** Hibernus Library 00002 * University of Southampton 2017 00003 * 00004 * Open-source liberary that enable any of your Mbed project work with transient enegy sources. 00005 * In order to use this library include the "hibernus.h" header file, and use the "Hibernus()" method at the beginning of you main funtion. 00006 * For more details and example see the "main.cpp" exampe file, and the attached documnetation 00007 * 00008 * 00009 * Released under the MIT License: http://mbed.org/license/mit 00010 */ 00011 #include "hibernus.h" 00012 #include "mbed.h" 00013 00014 DigitalOut bit0(LED1); 00015 DigitalOut bit1(LED2); 00016 DigitalOut bit2(LED3); 00017 DigitalOut bit3(LED4); 00018 00019 int main() 00020 { 00021 int c; 00022 Hibernus(); 00023 while(1) // Binary counter 00024 { 00025 bit0 = 0; bit1 = 0; bit2 = 0; bit3 = 0; for(c = 0; c<2000000; c++); // 0 00026 bit0 = 1; bit1 = 0; bit2 = 0; bit3 = 0; for(c = 0; c<2000000; c++); // 1 00027 bit0 = 0; bit1 = 1; bit2 = 0; bit3 = 0; for(c = 0; c<2000000; c++); // 2 00028 bit0 = 1; bit1 = 1; bit2 = 0; bit3 = 0; for(c = 0; c<2000000; c++); // 3 00029 bit0 = 0; bit1 = 0; bit2 = 1; bit3 = 0; for(c = 0; c<2000000; c++); // 4 00030 bit0 = 1; bit1 = 0; bit2 = 1; bit3 = 0; for(c = 0; c<2000000; c++); // 5 00031 bit0 = 0; bit1 = 1; bit2 = 1; bit3 = 0; for(c = 0; c<2000000; c++); // 6 00032 bit0 = 1; bit1 = 1; bit2 = 1; bit3 = 0; for(c = 0; c<2000000; c++); // 7 00033 bit0 = 0; bit1 = 0; bit2 = 0; bit3 = 1; for(c = 0; c<2000000; c++); // 8 00034 bit0 = 1; bit1 = 0; bit2 = 0; bit3 = 1; for(c = 0; c<2000000; c++); // 9 00035 bit0 = 0; bit1 = 1; bit2 = 0; bit3 = 1; for(c = 0; c<2000000; c++); // 10 00036 bit0 = 1; bit1 = 1; bit2 = 0; bit3 = 1; for(c = 0; c<2000000; c++); // 11 00037 bit0 = 0; bit1 = 0; bit2 = 1; bit3 = 1; for(c = 0; c<2000000; c++); // 12 00038 bit0 = 1; bit1 = 0; bit2 = 1; bit3 = 1; for(c = 0; c<2000000; c++); // 13 00039 bit0 = 0; bit1 = 1; bit2 = 1; bit3 = 1; for(c = 0; c<2000000; c++); // 14 00040 bit0 = 1; bit1 = 1; bit2 = 1; bit3 = 1; for(c = 0; c<2000000; c++); // 15 00041 } 00042 }
Generated on Wed Jul 27 2022 03:07:51 by
1.7.2