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:ae4dd2da243d, committed 2020-07-30
- Comitter:
- brendanmleech
- Date:
- Thu Jul 30 18:18:42 2020 +0000
- Commit message:
- ThermoCouple BrendanL t00050766
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832_lcd.lib Thu Jul 30 18:18:42 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jul 30 18:18:42 2020 +0000 @@ -0,0 +1,47 @@ + +#include "mbed.h" +#include "C12832_lcd.h" + +AnalogIn ain(p19); // ain is an object of class Analogin +DigitalOut led(LED1); // led is an object if class Digitalout +C12832_LCD lcd; // LCD is an object of class C12832 +float temperature; +InterruptIn joystickcenter(p14); +InterruptIn button(p9); +Timer debounce; +int i; +int x; + +void flip() { +led = !led; // toggles the led when the joystick button is pressed. +if (debounce.read_ms() > 1000 ) +x = 1; +debounce.reset(); +} + +int main() { +temperature = ain*600-200; + lcd.locate(0,0); + lcd.printf("Temperature needs reset"); + + if(temperature > 295) { + for (i=0;i<60;i++); + led=1; + wait(0.5); + x=1; + { + wait(0.5); // wait for a half a second + + joystickcenter.rise(&flip); // attach the function address to the rising edge + button.mode(PullUp); // With this, no external pullup resistor needed + button.rise(&flip); // attach the function address to the rising edge + + while(1) { // wait around, interrupts will interrupt this! + if(x==1){ // set x to 1 in flip() and compare it to 1 (i.e. if x ==1 { ... } ) + + + } + } +} +} +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jul 30 18:18:42 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file