Show Posts
Pages: 1 [2] 3 4 ... 147
16  Using Arduino / Project Guidance / Re: help with one wire temperature sensor LED project on: July 26, 2014, 12:01:48 am
I think it's just a case of improper allocation of variables

This compiles OK, and may be closer to what you want.

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

// 1 wire data pin 3
#define ONE_WIRE_BUS 3

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

DeviceAddress Thermistor1 = { 0x28, 0x6A, 0x15, 0x41, 0x05, 0x00, 0x00, 0xE6 };
DeviceAddress Thermistor2 = { 0x28, 0xD0, 0xB1, 0x40, 0x05, 0x00, 0x00, 0x8D };
DeviceAddress Thermistor3 = { 0x28, 0xF2, 0x96, 0x40, 0x05, 0x00, 0x00, 0xFC };
DeviceAddress Thermistor4 = { 0x28, 0x37, 0xB6, 0x40, 0x05, 0x00, 0x00, 0x70 };
DeviceAddress Thermistor5 = { 0x28, 0x8A, 0x1E, 0x41, 0x05, 0x00, 0x00, 0xBF };

int R = 2;

int G = 3;

int B = 4;

int T1, T2, T3, T4, T5;

void setup(void)
 // Start serial port
 // Start the library
 // Sets the resolution to 12 bit
 sensors.setResolution(Thermistor1, 12);
 sensors.setResolution(Thermistor2, 12);
 sensors.setResolution(Thermistor3, 12);
 sensors.setResolution(Thermistor4, 12);
 sensors.setResolution(Thermistor5, 12);

void printTemperature(DeviceAddress deviceAddress)
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00)
   Serial.print("Error getting temperature"); 
   Serial.print("F: ");
 pinMode(R, OUTPUT);
 pinMode(G, OUTPUT);
 pinMode(B, OUTPUT);

void loop(void)
 Serial.print("Getting temperature...\n\r");

 Serial.print("Thermistor 1 temperature is: ");
 Serial.print("Thermistor 2 temperature is: ");
 Serial.print("Thermistor 3 temperature is: ");
 Serial.print("Thermistor 4 temperature is: ");
 Serial.print("Thermistor 5 temperature is: ");
 if (T1 > 78)
  digitalWrite(R, HIGH);
  digitalWrite(R, LOW);
 if (T1 == 78)
  digitalWrite(G, HIGH);
  digitalWrite(G, LOW);
 if (T1 < 78)
  digitalWrite(B, HIGH);
  digitalWrite(B, LOW);

The resolution commands are redundant
17  Using Arduino / Programming Questions / Re: How accurate is this? Thermometer with arduino uno on: July 25, 2014, 07:49:04 pm

I'm using a TMP36. It came in a kit I bought some time ago.

OK, the same applies and you can still check it if you need to. Maybe the code is a little bit rough, but the TMP36 itself is popular and reputable. 
18  Using Arduino / Storage / Re: arduino and excel on: July 25, 2014, 09:17:55 am
I think he wants to go the other way meaning export data from an excel sheet to the arduino.

19  Using Arduino / Storage / Re: arduino and excel on: July 24, 2014, 11:08:10 pm
What you want to do is not clear but, since you mention Excel, the simplest solution is to export the data direct to Excel, thereby absolving you from any memory issues. You can use PLX-DAQ to do this. It is a macro that effectively makes Excel into a terminal. I don't know how you would go with such a rapid output.
20  Using Arduino / Programming Questions / Re: Communication over USB works fine, Bluetooth is a different story... on: July 24, 2014, 09:02:26 pm
should be spot on.

but appears to be quite some way short of that. I could not get it to work at first, and needed constant resetting.

It now works fine. I send strings over the phone and the responses comes up on the phone and the monitor. I don't know what I did to fix it. As far as "Bluetooth stuff" is concerned, you clearly have all you need.

char character;
 String request = String("");    
 String response = String("");
 void setup() {
 void loop() {
    while(Serial.available() > 0) {
      character =;
     if (request != "") {
     if (request == "id") {
     request = "";
     if (request == "at") {
     Serial.println("<at>76.0 F<at/>");
     request = "";
     if (request == "rt") {
     Serial.println("<at>68.0 F<at/>");
     request = "";

21  Using Arduino / Displays / Re: Displaying time on a 4x20 LCD on: July 24, 2014, 07:50:04 pm
Yes I did. It was accidently lifted from a serial.print
22  Using Arduino / Displays / Re: Displaying time on a 4x20 LCD on: July 24, 2014, 06:40:08 pm
Print leading zero

   if(second <10)
23  Using Arduino / Project Guidance / Re: Bluetooth Connections on: July 23, 2014, 07:17:08 pm
I want to be able to view the temperature readout of the probes either on my phone or on an LCD screen. I was thinking of using  Bluetooth connections...

Would I need to use 2 arduino boards? one for the probes and the second for the LCD Screen.
Would I also need 2 Bluetooth Shields do accomplish this communication?

or should I look into Xbee devices?

I don't think you have been resolute enough about what you want to do.

A plain-vanilla HC-05 Bluetooth should work well for this provided the range is OK. This is about 10m line of sight. In this event you can get by with one Arduino and one Bluetooth to do the all sensing and the transmitting. That rig can also do local display.

You can send to a phone, in which case no more Arduino is needed. Same applies to PC. If you can get by with three sensors, I use Bluetooth Graphics Terminal, which puts three little graphs onto an Android phone. It is excellent and the main reason for my getting the phone.

If the Bluetooth isn't up to the job, you might need to consider Xbee or Zigbee. I believe some of that stuff can work as a stand-alone remote sensor, no Arduino needed, but you are likely to then need an Arduiono at the receiving end in order to make sense of it all. In that event, the receiving Arduino could then re-transmit to the phone via blue tooth, so still no LCD required.

Bluetooth is so simple and so cheap you ought to try that first.

The only time you need more than one Arduino or Bluetooth is when you need Arduino<>Arduino communication, which is not likely.

24  Using Arduino / Programming Questions / Re: How accurate is this? Thermometer with arduino uno on: July 22, 2014, 10:28:18 pm
try putting a thermometer next to the sensor and checking
I actually don't have one  smiley-eek

0 and 100 are easy enough to check, even if you live at high altitude. If you can't come at that, try investing $3 in a sensor that you can have more faith in, like a DS18B20.

As it happens, a simple thermistor can be pretty good over a narrow range like room temperatures. If that is what you are using, I would be more inclined to trust it than  your feelings. The strange initial readings are probably some aberration, easily fixed or easily ignored.
25  Using Arduino / Programming Questions / Re: Android Smartphone to laptop on: July 22, 2014, 10:17:14 pm
I don't think it is necessary to write an Android app, as somebody has already done it.
26  Using Arduino / Sensors / Re: Measurement of DC current with non invasive method on: July 22, 2014, 10:02:32 pm
Unfortunatly in need to work with DC current..

I thought those clamp-on things worked by Oersted effect. If they don't, there is probably something that does. And why the need to be non-nvasive anyway?
27  Using Arduino / Networking, Protocols, and Devices / Re: Using AT-Commands to setup HC-05 BT device on: July 22, 2014, 02:40:35 am
One line of code won't help anybody much but you might try here:
28  Using Arduino / Displays / Re: 2x16 LCD SCREEN - NEED FOR 2X SIZE LETTERING on: July 20, 2014, 06:59:36 pm
You're right. I've found this link I had

I didn't think it was worth pursuing, and I don't know the procedure. However, since then I have had a 20x4 and that may be a e better proposition and should take a similar procedure. My graphic display has numbers 50 pixels high, and that suffices.
29  Using Arduino / Programming Questions / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 error on: July 20, 2014, 06:09:50 pm
the serial port and board are correct.

Any ideas?

Bad cable?
30  Using Arduino / Displays / Re: 2x16 LCD SCREEN - NEED FOR 2X SIZE LETTERING on: July 20, 2014, 05:49:52 pm
You might find that more easily accomplished on a graphic display. They commonly have multiple font sizes and I imagine they can be made even larger.
Pages: 1 [2] 3 4 ... 147