Getting Started (warning complete n00b)

I didn't see a better forum for this, if there is one, like an introductory forum that I missed, let me know. (I did look)

I'm new to the Arduino, but have been looking into it for a little while now (a few months, in spare time). I have been working with electronics for many years though, mostly simple projects, and mostly external interfacing, remote car starters, alarms and audio systems have been where I have spent most of my time. Some simple repairs to amplifiers and such as well.

My ultimate goal is to create a display to interface with the ECM in my vehicle (and a few friend's vehicles), I know it can be done, I have one working now, but from a company that built it doesn't seem to want to support any further development.

Arduino seems pretty user friendly for someone like me with basic (VERY basic) understanding of code, and experience with electronics.

My plan is to get an Arduino and an LCD sheild, but start with the basics, getting an LED to flash, getting a couple LEDs to flash in different sequences and for different reasons, etc, then move onto "Hello World." Not gonna try to be a hero right out of the gate. Eventually I want to use colour LCD displays, such as the small ones found in cell phones for gauges as well.

Anyway, sorry for the long into to this thread. I plan to pick up the basics this weekend (as long as they are in stock), and that's where I need some guidance.

From what I've read it seems that starting with the Arduino Uno would be a good base, and then adding an LCD shield for the end goals.

This is what I plan to start with: Arduino Uno: http://creatroninc.com/arduino-1/arduino-modules/arddu-031328.html LCD Shield: http://creatroninc.com/arduino-1/shields-for-arduino/display-shields/ardlc-999012.html

I have a 12V regulated power supply, soldering station, LEDs, and other misc electronics already, but is there anything else that would be recommended?

Thank you.

Sounds like fun! You might want to look at an LCD that isn't a shield, so you might put the screen in one place and the processor another, if space is tight.

Something like this:

https://www.adafruit.com/products/292

Combined with this:

https://www.adafruit.com/products/198

They are just examples, there would be other suppliers.

The nice thing about an I2C shield is, it only uses 2 pins (plus power and Gnd), leaving a whole lot over for other interfacing.

But, great idea to start simple, flash a few LEDs, get confident, and then move on to make something really awesome!

Yes, I've seen the backpacks to use with other displays, but for now I was trying to keep it simple, since the shield should/will work with the Arduino, I wanted to eliminate any possible hardware interfacing issues. Crawl, then walk, then run. I also plan on using multiple displays in the end, so keeping it simple for now, then adding more complexity. :)

I know the sketch that is needed will be a lengthy one. The program I use right now to datalog my ECM, has a rather lengthy file to interpret the datastream, and show the virtual dashboard, so I want to get it running on a single display before trying to add multiples.

As far as displays go, I have a couple colour LCD screens from an old Nokia phone that eventually I want to try to use, even just on the bench for fun, but for now I just want to keep things simple. :)

Thanks for the links. Providing that has helped confirm some suspicions about what can be used and how. :)

Hi,

Have you seen the obduino stuff? http://en.wikipedia.org/wiki/OBDuino

And guys are doing fuel injection and ecm replacements etc. Like http://community.ratsun.net/topic/29559-arduino-based-fuel-injection/

My shop has a nice i2C display here: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=170

You're no noob with what you've done!

DISCLAIMER: Mentioned stuff from my own shop...

Well I reckon you should just jump straight in!@ Ive done rather similar stuff to you, ive also installed haltech ecu's from scratch, road tune, etc, and ive just bought a uno, mega, 16 character parrallel lcd, sheild, wired up a lcd without sheild (easy) fiddled with the code, made it do similar things, then i bought a 240 x 320 colour touch screen and started playing with that, plugged into a Uno, I later plan to plug it into my MEGA and turn it into a GAS TURBINE ECU. I only discovered arduinos about 2 months ago. Wish I saw them years ago. I might also add that i've made the MEGA read k type thermocouples, sense rpm signal, up to 74k rpm and display it to the LCD. All in two months. (and that is with usual work and life time comintments that dont leave me much spare time at all)

It wont take you long! The hardest bit is working out how to write your code to make it do exactly what you want. No one will show you that. Every project is different and no one can program it for you. SO I think you should just buy your hardware your final project will have, wire it up and start hacking/programming/nutting it out! When you get stuck do a search on projects with the same hardware as yours and you will see tricks and tips and maybe even steal bits of code:) (I do that all the time.....doesnt everyone?) The Ultimate hardware to use for your type of project is a MEGA with a 2.8" TFT touch screen, with maybe any communication add ons....

cheers.

No, I hadn't seen the OBDuino project. It won't work for my intended applications though. I will be interfacing with OBD1 GM ECMs and PCMs, that don't run on a common diagnostic system. Each ECM/PCM, and even the different codes used in that same ECM/PCM have their own datastreams, that makes it a little more complex to, or just more interesting to get something like this to work. Luckily, all of the code I will be working with already has definitions to interpret the datastreams, I also have the raw text notes on most, if not all of the OBD1 GM diagnostic datastreams, there's a lot of them.

My plan is to have a sketch for each code I plan to interface with, much like how a "scanner" works, and just load up the appropriate sketch for that vehicle/ECM/PCM. I also know there will be many people that will be interested in the GM/Delco DIY_EFI community, if they can edit the files themselves. The display I currently have is limited to only two GM codes, one of which is a rather limited following, and the business that made it wants to see more sales, before adding the items to the firmware that would help sell, catch 22 right there. Oh well, their loss, my (knowledge) gain. I hate being locked to someone else's ideas. I'll either sell my current display, to somebody that has a Honda, since it's VERY supported, or use the display from it, since it seems to be very similar to what is used with the Arduino anyway.

I'd rather not get into building an ECM from the Arduino, there's enough out there already, that is easy to use, like the GM/Delco ECMs/PCM I use currently or MegaSquirt, now that MS3 is out.

I'm a n00b when it comes to the Arduino, at least. lol. :D

I know no one is going to write the code/sketch for me, and I wouldn't dream of someone doing it for me, how will I learn then, right? ;)

I think I agree with you Stimps, it won't take me long to get the hang of it and working, but I need to crawl before I can walk. ;)

I have been eyeing up the touch screens, and have ideas on what to use them for. The Arduino project might just be my answer for an attractive looking gauge cluster. I've tried several different gauge layouts and ideas in my 240Z, and none, I've been very happy with. I like the OEM layout, just not accurate enough, nor enough info displayed. I have a rather large opening where my tach currently resides, that could work well with at least a large screen, touch screen might be fun there too.

Thanks for the encouragement, I'll be making a phone call in a few minutes to make sure that what I want is in stock to pick up this weekend. :)

Let me second Stimps. Carefully choose your hardware and look for either 1) Cheap things that you know you will replace later or 2) The stuff you want to have eventually because changing things can be a pain. But, jump right in there.

Oh, I’m not disregarding what Stimps said, not at all.

Part of it is, that I don’t know exactly what Display(s) I want to use in the end. Knowing how I do projects like this, I will either replace some items a few times along the way, or get something simple working first and then change my mind about several upgrades along the way. lol

The part is that the more I look into the Arduino and the more mind mind wanders, the more projects I think about. I’m already thinking about (in the future, after I get comfortable with the Arduino), building something that will interface with an iPhone or iPod Touch, that will allow me to control my Home Theatre system. I’m sure that any “left over” parts will get recycled into new projects or for testing, at least. :slight_smile:

I should be picking up the first bits either tomorrow night or Saturday. :smiley:

w00t!!

I picked up an Arduion Uno, an LCD sheild and an LCD. It was a good thing I actually spent the 5 hour round trip (I hate Toronto traffic), to get it, because I didn't realize the LCD sheild didn't come with the LCD screen. If I would have ordered it, I would be short that part.

Anyway, I've spent some time today playing with it, firt to blink an LED, then fade, then plugged in the LCD and played with it a bit, changing delays and what was displayed on screen with good success, though I haven't figured out the scrolling or wrapping for a longer message yet, I will in time.

What I did that has paid made me a little happier though, was simple LED control. I know, very basic stuff, but I started with the blink sketch, added some extra pattern to the loop, changed the output pin, then decided to add a second LED to flash at a certain point in the pattern. This proved to be more involved than I had expected. Simple fix, but wasn't obvious to me at first. I had to assign pinMode to each pin, and add more code for the extra pin. Got it working in a few minutes, now I know. :D Just need to work on some timing, since I would like both LEDs to turn on together at that point, right now there is a bit of a delay, which I can see why in the sketch, just need to do a bit more reading. :D

So far, it's been fun, hopefully I'll be able to get farther along quickly. :) lol

Ok, getting into some real guidance here.

Still playing with LEDs, because I figure if I can't get this to work, then stay away from the LCD project, also since my plan involves LEDs in that one as well...

Anyway, I've been semi-successful in getting what I want to work, only not quite how I want yet.

I'll start with the code, then describe what is and isn't working:

/*
  Blink Blink
  Turns on an LED on for a short time, then off for a short time, then flash another LED.
  At least it's supposed to. 
  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(3, OUTPUT);
  pinMode(9, OUTPUT);
}

void loop() {
  
  digitalWrite(9, HIGH); //set the LED pin 9 on
   delay(300);           //wait .3 second
  digitalWrite(9, LOW);  //set LED pin 9 off
   delay(300);           // wait .3 second
  digitalWrite(3, HIGH);   // set the LED pin 3 on
  delay(300);              //wait .3 second
  digitalWrite(3, LOW);    //set LED pin 3 to off
  delay(300);              //wait .3 second
  
  
  
   
}

What I want to happen is one LED (on pin 9) turns on for the specified time, then turns off for a specified time, after which the next LED (on pin 3) turns on for a specified time, then off for a specified time.

What is happening is the LED on pin 9 turns on, followed by the LED on pin 3 turning on, then the LED on pin 9 turns off, followed by the LED on pin 3 turning off, repeat.

Now if I remove the delay commands after each LOW command, I can get the LEDs to alternate, but no delay between. The code where that works is below:

/*
  Blink Blink
  Turns on an LED on for a short time, then off for a short time, then flash another LED.
  At least it's supposed to. 
  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(3, OUTPUT);
  pinMode(9, OUTPUT);
}

void loop() {
  
  digitalWrite(9, HIGH); //set the LED pin 9 on
   delay(300);           //wait .3 second
  digitalWrite(9, LOW);  //set LED pin 9 off
              
  digitalWrite(3, HIGH);   // set the LED pin 3 on
  delay(300);              //wait .3 second
  digitalWrite(3, LOW);    //set LED pin 3 to off
     
}

I've tried while and if commands, but the while commands just seemed to turn one of the LEDs on (the one commanded for the while command). If seemed to have a similar result.

I also had a bunch of code iterations that didn't compile.

Is there a list of what specific error codes or phrases mean? Searching the forums seemed to get many results that seem very project specific and not just a generic "Here's what to look for when the error code says: ________."

Does the Arduino go through the outputs sets them each to their first setting? Basically what is the order of operations then? Set all pins to their initial setting, then run back through the code, waiting for the specified delays and setting them to the next setting?

Just trying to figure this out so that I can actually understand the order to make it easier to actually get somewhere.

OK, I got it working....

I inverted the HIGH and LOW commands in each digitalWrite...

It has to do with the output going LOW turning the LED on. :facepalm: I should have caught that sooner.

Both outputs in a "HIGH" state == LED off.

Getting there...