|
|

|
Porsche, and the Porsche crest are registered trademarks of Dr. Ing. h.c. F. Porsche AG.
This site is not affiliated with Porsche in any way. Its only purpose is to provide an online forum for car enthusiasts. All other trademarks are property of their respective owners. |
|
|
| underthetire |
Jun 29 2010, 08:42 PM
Post
#1
|
|
914 Guru ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,062 Joined: 7-October 08 From: Brentwood Member No.: 9,623 Region Association: Northern California |
My very first Arduino micro controller program. I've never used the Arduino language before ( think it c or C+ ? ) anyways, took me a few hours. Still need to order the thermocouple conversion chips, but looks like it will work. You can see when I put my finger over the analog pins, it does change as it should. Total cost will still be less than a single channel VDO gauge, and I will be able to calibrate it for more accurate readings.
https://www.youtube.com/watch?v=9UOUeEh11eg |
![]() ![]() |
| underthetire |
Jun 29 2010, 10:30 PM
Post
#2
|
|
914 Guru ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,062 Joined: 7-October 08 From: Brentwood Member No.: 9,623 Region Association: Northern California |
i'll put some more notes in it when I clean it up, but here it is..got a arduino and LCD shield on ebay, with shipping it was like 30 bucks total.
CODE /* The circuit: * LCD RS pin to digital pin 8 * LCD Enable pin to digital pin 9 * LCD D4 pin to digital pin 4 * LCD D5 pin to digital pin 5 * LCD D6 pin to digital pin 6 * LCD D7 pin to digital pin 7 * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> void setup() { Serial.begin(19200); Serial.println("Start"); } void loop() { label:; int raw = analogRead(1); int celsius = ( 5.0 * raw * 100.0) / 1024.0; Serial.print("Celsius: "); Serial.println(celsius); int fahrenheit = (((celsius * 9) / 5) + 32); Serial.print("Fahrenheit: "); Serial.println(fahrenheit); int raw1 = analogRead(2); int celsius1 = ( 5.0 * raw1 * 100.0) / 1024.0; Serial.print("Celsius1: "); Serial.println(celsius1); int fahrenheit1 = (((celsius1 * 9) / 5) + 32); Serial.print("Fahrenheit1: "); Serial.println(fahrenheit1); int raw2 = analogRead(3); int celsius2 = ( 5.0 * raw2 * 100.0) / 1024.0; Serial.print("Celsius2: "); Serial.println(celsius2); int fahrenheit2 = (((celsius2 * 9) / 5) + 32); Serial.print("Fahrenheit2: "); Serial.println(fahrenheit2); int raw3 = analogRead(4); int celsius3 = ( 5.0 * raw2 * 100.0) / 1024.0; Serial.print("Celsius3: "); Serial.println(celsius3); int fahrenheit3 = (((celsius3 * 9) / 5) + 32); Serial.print("Fahrenheit3: "); Serial.println(fahrenheit3); int warning =13; pinMode(warning, OUTPUT); int backlightc = 10; pinMode(backlightc, OUTPUT); digitalWrite(backlightc,HIGH); delay(100); // initialize the library with the numbers of the interface pins LiquidCrystal lcd(8, 9, 4, 5, 6, 7); const int numRows = 2; const int numCols = 16; //void setup() { // set up the LCD's number of rows and columns: lcd.begin(0, 2); // Print a message to the LCD. lcd.print("Cyl. 1 temp "); lcd.setCursor(12,0); lcd.print( fahrenheit); lcd.print( "F"); lcd.setCursor(0, 1); if (fahrenheit >400) digitalWrite(warning, HIGH); if (fahrenheit >400) delay (10000); lcd.print("Cyl. 2 temp "); lcd.setCursor(12,1); lcd.print(fahrenheit1); lcd.print("F"); if (fahrenheit1 >400) digitalWrite(warning, HIGH); if (fahrenheit1 >400) delay (10000); delay (3000); lcd.setCursor(0, 0); lcd.print("Cyl. 3 temp "); lcd.setCursor(12,0); lcd.print(fahrenheit2); lcd.print("F"); if (fahrenheit2 >400) digitalWrite(warning, HIGH); if (fahrenheit2 >400) delay (10000); lcd.setCursor(0, 1); lcd.print("Cyl. 4 temp "); lcd.setCursor(12,1); lcd.print(fahrenheit3); lcd.print("F"); if (fahrenheit3 >400) digitalWrite(warning, HIGH); if (fahrenheit3 >400) delay (10000); delay(3000); if (fahrenheit <400) digitalWrite(warning, LOW); if (fahrenheit1 <400) digitalWrite(warning, LOW); if (fahrenheit2 <400) digitalWrite(warning, LOW); if (fahrenheit3 <400) digitalWrite(warning, LOW); goto label; } |
underthetire My arduino cyl head temp display Jun 29 2010, 08:42 PM
McMark Very cool! :thumbsup: Looks like fun. You mi... Jun 29 2010, 10:03 PM
jabberwocky I was thinking a similar rout as I have programed ... Jun 29 2010, 10:04 PM
underthetire I don't mind sharing the code at all. I'm ... Jun 29 2010, 10:24 PM
McMark At first glance, it looks like you're looping ... Jun 29 2010, 10:39 PM
underthetire
At first glance, it looks like you're looping... Jun 29 2010, 10:43 PM
underthetire Yep, needs to re-read all the temp setup to update... Jun 29 2010, 10:50 PM
McMark It's an awesome first project! :headbange... Jun 29 2010, 11:41 PM
underthetire
It's an awesome first project! :headbang... Jun 30 2010, 08:35 AM
obscurity I haven't looked at the code too closely but y... Jun 30 2010, 04:36 PM
underthetire
I haven't looked at the code too closely but ... Jun 30 2010, 04:46 PM
narino This is AWESOME.
:popcorn: Jun 30 2010, 04:54 PM
underthetire Ok, got rid of the goto, your right didn't nee... Jun 30 2010, 07:57 PM
SirAndy
Any more suggestions would be welcome :D
I put ... Jun 30 2010, 10:13 PM
jeffdon
Any more suggestions would be welcome :D
I put ... Jun 30 2010, 10:29 PM
underthetire Thanks andy. There is actually a demo program with... Jun 30 2010, 10:34 PM
Lennies914 Very cool stuff Jeff, looking forward to seeing th... Jun 30 2010, 10:46 PM
ottox914 When you get it all figured out I want one. I bet... Jul 1 2010, 06:39 AM
underthetire
When you get it all figured out I want one. I be... Jul 1 2010, 09:24 AM
narino
When you get it all figured out I want one. I b... Jul 1 2010, 10:37 AM
SirAndy Andy - have you found an "affordable" ci... Jul 1 2010, 11:09 AM
obscurity
[quote name='underthetire' post='1337761' date='J... Jul 1 2010, 02:54 PM
jaxdream Don't know what all the costs are for a setup ... Jul 1 2010, 07:14 AM
jabberwocky
Don't know what all the costs are for a setup... Jul 1 2010, 08:50 AM
underthetire
Don't know what all the costs are for a setup... Jul 1 2010, 09:17 AM
narino This is what I was thinking.
Jul 1 2010, 11:04 AM
underthetire I think i'm actually going to try and fit the ... Jul 1 2010, 03:45 PM
jaxdream Underthetire , a list of parts would be great , as... Jul 1 2010, 09:00 PM
narino :bump:
Jeff - How's this coming along?
:be... Jul 23 2010, 12:18 PM
underthetire Parts list
http://cgi.ebay.com/Arduino-Duemilanove... Jul 23 2010, 12:48 PM
underthetire Ok, ripped the whole front of my Jeep off tonight ... Jul 23 2010, 11:06 PM![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd December 2025 - 10:15 AM |
| All rights reserved 914World.com © since 2002 |
|
914World.com is the fastest growing online 914 community! We have it all, classifieds, events, forums, vendors, parts, autocross, racing, technical articles, events calendar, newsletter, restoration, gallery, archives, history and more for your Porsche 914 ... |