Instrumentation Monitoring and Control Winter Lab 1 T00221592
Dependencies: mbed mbed-rtos C12832_lcd LCD_fonts
Revision 4:23fbf558b971, committed 2021-12-20
- Comitter:
- t00221592
- Date:
- Mon Dec 20 19:22:25 2021 +0000
- Parent:
- 3:3ec443c0842a
- Commit message:
- Michael Mc Namara T00221592 Instrumentation Monitoring and control Winter Lab Report
Changed in this revision
--- a/C12832_lcd.lib Wed Dec 05 08:06:20 2012 +0000 +++ b/C12832_lcd.lib Mon Dec 20 19:22:25 2021 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/dreschpe/code/C12832_lcd/#8d812da33cdc +http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- a/main.cpp Wed Dec 05 08:06:20 2012 +0000
+++ b/main.cpp Mon Dec 20 19:22:25 2021 +0000
@@ -16,6 +16,12 @@
AnalogIn Pot1(p19);
AnalogIn Pot2(p20);
+//JOYSTICK
+BusIn joy(p15,p12,p13,p16);
+DigitalIn fire(p14);
+
+BusOut leds(LED1,LED2,LED3,LED4);
+
// mutex to make the lcd lib thread save
Mutex lcd_mutex;
@@ -94,6 +100,21 @@
}
}
+// Thread 5
+// input joystick and change LED
+void thread5(void const *args)
+
+{
+ int main();
+ while(1) {
+ if (fire) {
+ leds=0xf;
+ } else {
+ leds=joy;
+ }
+ wait(0.1);
+ }
+}
// print the actual contrast
int main()
@@ -105,7 +126,8 @@
Thread t2(thread2); //start thread2
Thread t3(thread3); //start thread3
Thread t4(thread4); //start thread4
-
+ Thread t5(thread5); //start thread5
+
while(true) { // main is the next thread
lcd_mutex.lock();
LCD.locate(0,9);
--- a/mbed-rtos.lib Wed Dec 05 08:06:20 2012 +0000 +++ b/mbed-rtos.lib Mon Dec 20 19:22:25 2021 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#88a1a9c26ae3 +http://mbed.org/users/mbed_official/code/mbed-rtos/#5713cbbdb706
--- a/mbed.bld Wed Dec 05 08:06:20 2012 +0000 +++ b/mbed.bld Mon Dec 20 19:22:25 2021 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/b60934f96c0c \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file