Show Posts
Pages: 1 ... 12 13 [14] 15 16 ... 22
196  Using Arduino / Programming Questions / how can i copy the errors out of the compiler? on: June 10, 2012, 05:58:37 am
hi,
just wondering how to get the errors out of the compiler the bit at the bottom red text?, cant seem to copy and past them
thank you
197  Using Arduino / Programming Questions / cant get program to compile on: June 08, 2012, 11:04:55 am
hi,
im building this project, a thermostat that controls a fan, its someone else's code, but i cant get the program to compile could someone please tell me what the error is in the program.
thank you

Code:

#include <OneWire.h>
#include <DallasTemperature.h>
#include <LiquidCrystal.h>

int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor
int setTemp = 0; // variable to store temp desired
int SSRPin = 9;
char* heat;

float currentTemp = 0;

// Connections:
// rs (LCD pin 4) to Arduino pin 12
// rw (LCD pin 5) to Arduino pin 11
// enable (LCD pin 6) to Arduino pin 10
// LCD pin 15 to Arduino pin 13
// LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int backLight = 13; // pin 13 will control the backlight

// Data wire is plugged into pin 7 on the Arduino
#define ONE_WIRE_BUS 7

// 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);

DeviceAddress insideThermometer = { 0x28, 0xBC, 0xDA, 0xE3, 0x02, 0x00, 0x00, 0x09 };
// DeviceAddress outsideThermometer = { 0x28, 0x20, 0x04, 0xA8, 0x02, 0x00, 0x00, 0x4D };

void setup(void)
{
// Start up the library
sensors.begin();
// set the resolution to 10 bit (good enough?)
sensors.setResolution(insideThermometer, 10);
// sensors.setResolution(outsideThermometer, 10);

pinMode(backLight, OUTPUT);
digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
lcd.begin(20,4); // columns, rows. use 16,2 for a 16x2 LCD, etc.

pinMode(SSRPin, OUTPUT);
digitalWrite(SSRPin, LOW);

}

void printTemperature(DeviceAddress deviceAddress)
{
 
sensors.requestTemperatures();  // was in loop

float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
lcd.print("Error");
} else {
// lcd.print(tempC);
// lcd.print("/");
currentTemp = (DallasTemperature::toFahrenheit(tempC));
lcd.print(currentTemp);

if (currentTemp < setTemp)
{
  digitalWrite(SSRPin, HIGH);
  heat = "On";
}
else
{
  digitalWrite(SSRPin, LOW);
  heat = "Off";
}

}
}

void loop(void)
{
delay(1000);

  sensorValue = analogRead(sensorPin); 
 
  setTemp = sensorValue / 4;
 
 
 



lcd.clear(); // start with a blank screen


lcd.setCursor(0,0);
lcd.print("Current: ");
lcd.setCursor(0,1);
lcd.print("Set: ");
lcd.setCursor(0,3);
lcd.print("Heat: ");



lcd.setCursor(10,0);
printTemperature(insideThermometer);
lcd.setCursor(6,1);
lcd.print(setTemp);
lcd.setCursor(7,3);
lcd.print(heat);



}



198  Using Arduino / Displays / Re: auto contrast display. on: June 08, 2012, 10:54:03 am
thanks for the help, i didnt have pins 15,16 connected. all ok now
199  Using Arduino / Displays / Re: auto contrast display. on: June 07, 2012, 01:58:26 pm
it says on the back,
please note, the contrast in this display is automatic and so pin 3 need not be connected. if an adjustment trimmer is provided it will have no effect
200  Using Arduino / Displays / auto contrast display. on: June 07, 2012, 12:42:45 pm
hi,
ive just brought a 20 4 display just noticed thats its an auto contrast display, i cant get it to go, its set us as "hello world" just wondering if i should feed +5v into V0 as thats where the wiper went?
thank you

ive just noticed a very very very  faint, hello world, how can wind it up if its auto contrast??
201  Using Arduino / General Electronics / Re: Could someone make me a Eagle part Bosch CJ125? on: June 06, 2012, 09:37:28 am
designspark has billions of components in their library's, that one is in there, design spark is a very very easy to use
i also vouch for expresssch.
202  Using Arduino / General Electronics / Re: re-set pin 1 what does it do? on: June 04, 2012, 09:34:50 am
thanks
203  Using Arduino / General Electronics / re-set pin 1 what does it do? on: June 03, 2012, 07:14:02 am
hi,
just wondering what actually happens within the ic when, a low is applied to pin 1, im thinking the software is re-loaded somehow and starts again?
thank you
204  Using Arduino / Programming Questions / Re: Thermostat type program - wanted on: June 03, 2012, 05:01:14 am
no i couldnt, i managed to find a gps type project, thats the reason why i posted here for help in finding one.

thank you dxwood, now ive found a few
205  Using Arduino / Programming Questions / Thermostat type program - wanted on: June 03, 2012, 04:27:28 am
hi,
i dont suppose anybody has come across a thermostat type program have searched high/low but havnt found anything, what im looking for is something that you can control the temp of a room via a fan.

ie when the temp gets out of range it turns on a relay which switches on a fan to cool down the room, then switches off when the temp is correct.

be great if an lcd was involved to see the temp as well

thank you 
206  Using Arduino / General Electronics / Re: How long a wire can you use to connect two arduino's before you get data loss? on: May 31, 2012, 02:39:27 pm
best way is to test it and see, i tested a 45m run 1mm stranded wire, screened worked fine, i was switching 0v's, i measured a 5v, and i got 4.98v out the other end, id use a 100m run of cat5 screened to guard from interference.
207  Using Arduino / General Electronics / Re: Unuasual pot on: May 30, 2012, 05:22:35 pm
found one, thank you
208  Using Arduino / General Electronics / Unuasual pot on: May 30, 2012, 05:00:56 pm
hi,
ive got a project in mind that requires an unusual pot, im after a pot for a front panel that has a monetary push switch on it, so when you turn it then push to make the switch, dont soppose anybody knows where to get one or what they are called? im in the uk

thank you
209  Using Arduino / General Electronics / Re: How to solder a piezo? on: May 30, 2012, 02:12:07 pm
used to solder millions of these years ago when i worked for pision, you have to be very quick on the centre bit, else you will damage it
210  Using Arduino / General Electronics / re-set pin resistor on: May 29, 2012, 08:27:38 am
hi,
ive just finished laying out a uno bare board / breakout board, and ive just noticed the re-set pin (1) resistor is only 1k as compared to 10k on the uno? wondering which one is correct?
cheers
Pages: 1 ... 12 13 [14] 15 16 ... 22