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.
Dependencies: PID QEI SB1602E mbed-rtos mbed
Fork of PreHeater by
Revision 2:387240c58110, committed 2015-06-13
- Comitter:
- kazu_zamasu
- Date:
- Sat Jun 13 06:34:11 2015 +0000
- Parent:
- 1:f974481c37b6
- Child:
- 3:9af1bd67c5f8
- Commit message:
- ???????????????
Changed in this revision
| SB1602E.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SB1602E.lib Sat Jun 13 06:34:11 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/okano/code/SB1602E/#baf578069dfc
--- a/main.cpp Sat Jun 13 04:30:15 2015 +0000
+++ b/main.cpp Sat Jun 13 06:34:11 2015 +0000
@@ -3,6 +3,7 @@
#include "QEI.h"
#include "rtos.h"
#include "math.h"
+#include "SB1602E.h"
#define ROTATE_PER_REVOLUTIONS 24 //QEI 1 rotate by count
#define THR 560 /PTH pull up register value
@@ -30,11 +31,17 @@
DigitalOut led1(dp14),led2(dp28);
DigitalIn Run(dp17,PullUp);
+float temp_sv_input;
+double temp_pv,temp_cal;
+char *init_massage = "Welcome!";
+
+//init_massage = 'Hello';
//Rotary encode pin, pinmode and sppecification instance
QEI wheel(dp11, PullUp, dp13, PullUp,NC, ROTATE_PER_REVOLUTIONS, QEI::X2_ENCODING);
+//LCD I2C pin asign
+SB1602E lcd(dp5, dp27, init_massage); // SDA, SCL
-float temp_sv_input;
-double temp_pv,temp_cal;
+
void TempCal_thread(void const *args) {
while (true) {
@@ -53,9 +60,8 @@
//Insert LCD code
-/*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-*/
+ lcd.printf(0, "Temp SP %.1f\n", temp_sv_input);
+ lcd.printf(1, "Temp PV %.1f\n", temp_pv);
}
}
@@ -80,9 +86,8 @@
TIC.setProcessValue(temp_cal);
//Set the new output.
out = TIC.compute();
+ }
//Wait for another loop calculation.
Thread::wait(RATE);
- }
-
}
}
\ No newline at end of file
