HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 02, 2013, 02:14 PM
Cheif Bottlewasher
more coffee's Avatar
Canada, NS, Sydney Mines
Joined Sep 2005
3,181 Posts
Yippee!
Getting on the wagon

Ive started to mess around with this Arduino UNO R3 board.
I bought two ,in case I blew one up.

I messed around with a few examples just to get it my way.these are somebody else's work bent to my will..but it a start.

*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints "Hello World!" to the LCD
and shows the time.

The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello Brianna!!");
}
void loop() {
lcd.setCursor(0, 1);
lcd.print("Hello Jenna !!");
}


Im now beginning to realise that ,actuating animations such as radar,bilge pumps,lights..Its not going to bee that hard.I just have to get trough the software and get a better grip.

How does Raspberry compare to Arduino?
more coffee is offline Find More Posts by more coffee
RCG Plus Member
Latest blog entry: Hi!
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 02, 2013, 08:16 PM
---o-O-o---
blutoh's Avatar
United States, NJ, Livingston
Joined Mar 2012
1,602 Posts
Hi more coffee,

Jump on in, the water's fine! To best answer your question, Raspberry Pi is a full microcomputer with a Linux OS (operating system) layer sitting between the hardware and any executing programs. The Arduino is a microcontroller board that runs a single progam directly without the use (or overhead) of an OS. To get a better idea, read thru these two threads:
  1. Full RC Arduino Control
  2. Making noise with the Raspberry Pi

They demonstrate the differences in how the two boards can be deployed and how the software is created for each. Then ask a lot of questions, everyone here is happy to help. Most of us eventually wind up using both boards serving different purposes.

blutoh
blutoh is offline Find More Posts by blutoh
Last edited by blutoh; Oct 02, 2013 at 08:26 PM.
Reply With Quote
Old Oct 02, 2013, 11:16 PM
Cheif Bottlewasher
more coffee's Avatar
Canada, NS, Sydney Mines
Joined Sep 2005
3,181 Posts
Thanks blutoh

After wandering around barefoot and blindfolded..

I think I have an idea of the Whosit's..
It seems Ardunio is more a command and control platform.as long as you have enough memory and I/O ports ..
Raspberry its your whole kitchen + the sink .,with web based servers and command/control.. data logging ..and the list goes on..
Python does seem like a little easier to navigate.

Time to call for back up.....I'll see what my 9yr old has to say when she gets home..
more coffee is offline Find More Posts by more coffee
RCG Plus Member
Latest blog entry: Hi!
Reply With Quote
Old Oct 07, 2013, 09:29 AM
Registered User
United States, PA
Joined Feb 2013
92 Posts
Hi more coffee,

I am not a programmer, like blutoh and dutchraptor, but the Python seems a lot more readable to me too. If you look at the code in the two posts blutoh linked, you can see the difference. What I have learned by following them both, and searching the web, is that Python is a "higher level" language than "C", but the trade off is performance (speed), thats why the microcomputer boards (raspberry, etc) need more horsepower than the dedicated microcontroller boards. They need the extra power (processor and memory) to allow for the operating system and additional hardware. I also rely on my backup (16 yr old son) to educate me and explain a lot of this stuff

HD
Heavy_Duty is offline Find More Posts by Heavy_Duty
Reply With Quote
Old Oct 10, 2013, 07:18 PM
Registered User
Deckie's Avatar
Australia, WA, Garden Island
Joined Nov 2010
464 Posts
Welcome welcome, and prepare to have the remainder of your spare time consumed
Deckie is offline Find More Posts by Deckie
Reply With Quote
Old Oct 11, 2013, 12:32 AM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
298 Posts
Resistance is Futile, you will be assimilated by the C/pythons (that sounds a bit geeky, I know).

Don't go to fast, choose a path to start with, the other will follow. Say goodbye to your former view of the modelling world. Once you start to understand these things (either Raspberry or Arduino), there is no turning back to the old school without thinking: couldn't I make it better/cheaper/flexible/...

I'm nowhere near a real programmer, just a hobbyist with a little technical background and a bit of curiousity. I like the raspberry for it's power, but I do most stuff with Arduino's since they are almost instant with starting up and for me easier to understand and interact with the standard RC stuff.

Danny
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Oct 15, 2013, 09:14 PM
Cheif Bottlewasher
more coffee's Avatar
Canada, NS, Sydney Mines
Joined Sep 2005
3,181 Posts
So my first venture is pretty standard.
I wanted a 4-Ch thermometer for my truck,engine,oil,transmission,ambient..
The display is a 20x4 serial lcd
Using 4 DS18B20 temp sensors
So after about 3days and a bricked UNO board,(don't ask) I made some progress..I now know how Tony Stark feels


Now ,I just have to figure out how to load this onto ATMEGA8L-8PU ..And build it out so it works for me.
I know its a little of topic but if your ever wondering what hot and whats not..this would work for you.
Just remember to get the address of your DS18B20's and plug it into the Device Address




Code:
  // This Arduino sketch reads DS18B20 "1-Wire" digital
  // temperature sensors.
  
  
  #include <OneWire.h>
  #include <DallasTemperature.h>
  #include <LiquidCrystal.h>
  
  
  LiquidCrystal lcd(12, 11, 10, 9,8,7);//lcd connected to these pins
  
  int backLight = 13; // pin 13 will control the backlight
  
  // Data wire is plugged into pin 2 on the Arduino
  #define ONE_WIRE_BUS 2
  
  // Setup a oneWire instance to communicate with any OneWire devices
  OneWire oneWire(ONE_WIRE_BUS);
  
  // Pass our oneWire reference to Dallas Temperature. 
  DallasTemperature sensors(&oneWire);
  
  // Assign the addresses of your 1-Wire temp sensors.
  // Retrieve address from each sensor,then enter them into the device address
  
  DeviceAddress Engine = { 0x28, 0xE0, 0xFE, 0x73, 0x03, 0x00, 0x00, 0xF7 };
  DeviceAddress Oil = { 0x28, 0x82, 0x1B, 0x74, 0x03, 0x00, 0x00, 0xD4 };
  DeviceAddress Trans ={};
  DeviceAddress Ambient ={};
  void setup(void)
  {
  // Start up the library
  sensors.begin();
  // set the resolution to 12 bit (good enough)
  sensors.setResolution(Engine, 12);
  sensors.setResolution(Oil, 12);
  sensors.setResolution(Trans, 12);
  sensors.setResolution(Ambient,12);
  
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(20,4); // columns, rows. use 20,4 for a 20x4 LCD, etc.
  lcd.clear(); // start with a blank screen
  }
  
  void printTemperature(DeviceAddress deviceAddress)
  {
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00) {
  lcd.print("Error");
  } else {
  lcd.print(tempC);
  
  
  }
  }
  
  void loop(void)
  { 
  delay(200);// temp refresh rate 
  sensors.requestTemperatures(); // 
  //Start engine temp
  lcd.setCursor(0,0);
  lcd.print("Engine   ");
  printTemperature(Engine);
  lcd.setCursor(16,0);
  lcd.print((char)223);
  lcd.print("C");
  //start oil temp
  lcd.setCursor(0,1);
  lcd.print("Oil      ");
  printTemperature(Oil);
  lcd.setCursor(16,1);
  lcd.print((char)223);
  lcd.print("C");
  //start Trans temp
  lcd.setCursor(0,2);
  lcd.print("Trans    ");
  printTemperature(Trans);
  lcd.setCursor(16,2);
  lcd.print((char)223);
  lcd.print("C");
  
  //Ambient or outside temp
  lcd.setCursor(0,3);
  lcd.print("Ambient  ");
  printTemperature(Ambient);
  lcd.setCursor(16,3);
  lcd.print((char)223);
  lcd.print("C");
  
  
  }
more coffee is offline Find More Posts by more coffee
RCG Plus Member
Latest blog entry: Hi!
Reply With Quote
Old Oct 16, 2013, 03:05 AM
Registered User
Deckie's Avatar
Australia, WA, Garden Island
Joined Nov 2010
464 Posts
Quote:
Originally Posted by more coffee View Post
So my first venture is pretty standard.
I wanted a 4-Ch thermometer for my truck,engine,oil,transmission,ambient..
The display is a 20x4 serial lcd
Using 4 DS18B20 temp sensors
So after about 3days and a bricked UNO board,(don't ask) I made some progress..I now know how Tony Stark feels


Now ,I just have to figure out how to load this onto ATMEGA8L-8PU ..And build it out so it works for me.
I know its a little of topic but if your ever wondering what hot and whats not..this would work for you.
Just remember to get the address of your DS18B20's and plug it into the Device Address




Code:
  // This Arduino sketch reads DS18B20 "1-Wire" digital
  // temperature sensors.
  
  
  #include <OneWire.h>
  #include <DallasTemperature.h>
  #include <LiquidCrystal.h>
  
  
  LiquidCrystal lcd(12, 11, 10, 9,8,7);//lcd connected to these pins
  
  int backLight = 13; // pin 13 will control the backlight
  
  // Data wire is plugged into pin 2 on the Arduino
  #define ONE_WIRE_BUS 2
  
  // Setup a oneWire instance to communicate with any OneWire devices
  OneWire oneWire(ONE_WIRE_BUS);
  
  // Pass our oneWire reference to Dallas Temperature. 
  DallasTemperature sensors(&oneWire);
  
  // Assign the addresses of your 1-Wire temp sensors.
  // Retrieve address from each sensor,then enter them into the device address
  
  DeviceAddress Engine = { 0x28, 0xE0, 0xFE, 0x73, 0x03, 0x00, 0x00, 0xF7 };
  DeviceAddress Oil = { 0x28, 0x82, 0x1B, 0x74, 0x03, 0x00, 0x00, 0xD4 };
  DeviceAddress Trans ={};
  DeviceAddress Ambient ={};
  void setup(void)
  {
  // Start up the library
  sensors.begin();
  // set the resolution to 12 bit (good enough)
  sensors.setResolution(Engine, 12);
  sensors.setResolution(Oil, 12);
  sensors.setResolution(Trans, 12);
  sensors.setResolution(Ambient,12);
  
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(20,4); // columns, rows. use 20,4 for a 20x4 LCD, etc.
  lcd.clear(); // start with a blank screen
  }
  
  void printTemperature(DeviceAddress deviceAddress)
  {
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00) {
  lcd.print("Error");
  } else {
  lcd.print(tempC);
  
  
  }
  }
  
  void loop(void)
  { 
  delay(200);// temp refresh rate 
  sensors.requestTemperatures(); // 
  //Start engine temp
  lcd.setCursor(0,0);
  lcd.print("Engine   ");
  printTemperature(Engine);
  lcd.setCursor(16,0);
  lcd.print((char)223);
  lcd.print("C");
  //start oil temp
  lcd.setCursor(0,1);
  lcd.print("Oil      ");
  printTemperature(Oil);
  lcd.setCursor(16,1);
  lcd.print((char)223);
  lcd.print("C");
  //start Trans temp
  lcd.setCursor(0,2);
  lcd.print("Trans    ");
  printTemperature(Trans);
  lcd.setCursor(16,2);
  lcd.print((char)223);
  lcd.print("C");
  
  //Ambient or outside temp
  lcd.setCursor(0,3);
  lcd.print("Ambient  ");
  printTemperature(Ambient);
  lcd.setCursor(16,3);
  lcd.print((char)223);
  lcd.print("C");
  
  
  }
Great to read of your success! those Dallas One-wire temp sensors are brilliant, easy to use and relatively cheap for the feature set. Keep on keeping us all posted
Deckie is offline Find More Posts by Deckie
Reply With Quote
Old Oct 16, 2013, 03:24 AM
Registered User
Dutchraptor's Avatar
The Netherlands, ZH, Hoogvliet
Joined Jul 2008
298 Posts
You can use your Arduino Uno as a programmer for the Atmega8 (or any other). I use a shield because I'm to lazy to setup the breadboard everytime, but on the website: http://arduino.cc/en/Tutorial/ArduinoISP you can see how it works. This way you can write the firmware and after that the sketch to the fresh Atmega. I use this for the small Atiny series and Atmega644 (a 64k pinmonster).

Search Google for a Paperduino. This is a good bases for a home build/design Arduino. Look for: Arduino breadboard for a breadboard version you can solder. Or a freeform (and very small version) is a single chip Arduino like this version: http://make.kosakalab.com/arduino/ob.../index_en.html

Good luck,

Danny
Dutchraptor is online now Find More Posts by Dutchraptor
Reply With Quote
Old Oct 16, 2013, 12:37 PM
---o-O-o---
blutoh's Avatar
United States, NJ, Livingston
Joined Mar 2012
1,602 Posts
Some good paperduino links:

Paper-PCBs
PAPERduino’s design

blutoh
blutoh is offline Find More Posts by blutoh
Reply With Quote
Old Oct 16, 2013, 08:58 PM
Cheif Bottlewasher
more coffee's Avatar
Canada, NS, Sydney Mines
Joined Sep 2005
3,181 Posts
You know..Its really easy to get greedy with this .
Almost wish I got a 128x68 display ,volts , amps , oil pressure , washer fliud level ,
more coffee is offline Find More Posts by more coffee
RCG Plus Member
Latest blog entry: Hi!
Reply With Quote
Old Oct 18, 2013, 03:07 PM
---o-O-o---
blutoh's Avatar
United States, NJ, Livingston
Joined Mar 2012
1,602 Posts
Uh-oh, your project is experiencing scope creep!
blutoh is offline Find More Posts by blutoh
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Maiden on Tritle Ag Wagon mnowell129 Scale Kit/Scratch Built 2 Aug 26, 2012 08:14 AM
For Sale Mamod Steam Wagon with open and lumber wagon hampboats Non R/C Items (FS/W) 1 Jun 12, 2012 04:11 PM
Gallery Two wheels on my wagon- scale Bearcat retracts leccyflyer Scale Fuel Planes 3 Jan 13, 2006 06:01 PM
Opinions on wagons? windsurfer Life, The Universe, and Politics 19 Oct 05, 2005 11:06 PM
Help me rig some Xmas lights on a wagon tenover Life, The Universe, and Politics 3 Dec 06, 2003 04:16 PM