Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 14
136  Using Arduino / Project Guidance / Displaying serial data from a apc220 on a lcd on: November 16, 2011, 08:57:12 pm
I'm trying to monitor the temperature in one building from another building 65 feet( about 20 meters) away. i am using 2 apc220s. I want to use an Arduino on the receiving end and possibly be able to switch a heater off/on as  well. At present I have one Arduino monitoring the temperature and can read it in the other building reliably on a PC. However every attempt to display the data using an LCD on another Arduino with the apc220 I have made has failed to compile. I am new to programming so this may simply be my ignorance. The message I transmitting is "Temperature is XX degrees F, The humidity is YY%". I have a 20X4 LCD, connecting via I2C.

Jim
137  Using Arduino / Programming Questions / Re: trying tolearn case on: November 10, 2011, 08:31:58 pm
Thanks guys, I got everything working with "else if" but I thought it would be clearer with "switch-case". Looking at your sample I can see that this is definitely true.

Jim
138  Using Arduino / Programming Questions / trying tolearn case on: November 10, 2011, 05:56:31 pm
 wrote this with "else if" statements and it worked. I'm trying to learn the case statement so I started to re-write. It compiled for 'a' but when I added 'b' I got these errors.

temp_rf_case.cpp: In function 'void loop()':
temp_rf_case:39: error: duplicate case value
temp_rf_case:33: error: previously used here

 I tried to use insert code here, but got a mess of "color" statements and code was unreadable, sorry.

#include <SHT1x.h>

#define dataPin  10   // DATA
#define clockPin 11   // SCK
#define dataPin2  10   // DATA
#define clockPin2 11   // SCK
 int heater = 9;
 int fan = 8;
  int val = 0;
  float temp_c;
  float temp_f;
  float humidity;
SHT1x sht1x(dataPin, clockPin);
SHT1x sht1x2(dataPin2, clockPin2);

void setup()
{
   Serial.begin(9600);
}

void loop()
{
  temp_c = sht1x.readTemperatureC();
  temp_f = sht1x.readTemperatureF();
  humidity = sht1x.readHumidity();


  val = Serial.read(); // See what command is
  switch (val)
  {
    case -1:
    break;
    case 'A' || 'a' :
       // Read values from the sensor
       // Print the values to the serial port
         Serial.print("Temperature: ");
         Serial.print(temp_f, DEC);
         Serial.println("F");
   case 'B' || 'b' :
       {
         Serial.print("Humidity: ");
         Serial.print(humidity);
         Serial.println("%");
       }
/*   else if ('C' == val || 'c' == val)
       {
         digitalWrite (heater, HIGH);
       }
   else if ('D' == val || 'b' == val)
       {
         digitalWrite (heater, LOW);
       }
   else if ('E' == val || 'e' == val)
       {
         digitalWrite (fan, HIGH);     
       }               
   else if ('F' == val || 'f' == val)
       {
         digitalWrite (fan, LOW);     
       } */
  }       
139  Using Arduino / Project Guidance / Re: fastest pulse? on: November 06, 2011, 06:24:48 pm
Would this be better done with a 556?

Jim
140  Using Arduino / Project Guidance / fastest pulse? on: November 06, 2011, 06:12:58 pm
I need to produce 2 separate pulses, simultaneously, both pulses variable in both rep rate and pulse width. max frequency is about 1000 Hertz. Pulse width should be from 5% to 100%. What is the minimum time between 2 digital writes? I know I can time with milli's, but I am not sure what the timing is on writes themselves. I can't use PWM as rep rate never changes. I also unsure how I handle keeping width a constant % as rep rate changes. Is this possible with an Uno?

Jim
141  Using Arduino / Installation & Troubleshooting / Re: After hard sisk crash driver not found for mega on: October 23, 2011, 03:32:24 pm
Due to other issues, I formatted the drive and reloaded Windows  again and reloaded the drivers. Everything worked! It must have been a bad Windows installation.
jim
142  Using Arduino / Installation & Troubleshooting / is there a definition of terms for the preferences file on: October 21, 2011, 02:05:13 pm
I would like to set up the environment so it starts full screen with the last opened file opened. The terse keys in the preference file are not self explanatory enough to show me how to do this. Is it even possible?
Jim
143  Using Arduino / Installation & Troubleshooting / Re: After hard sisk crash driver not found for mega on: October 05, 2011, 07:33:42 pm
Coding Badly asked some questions. I'll have the answers tomorrow if snow allows.

Jim
144  Using Arduino / Installation & Troubleshooting / Re: After hard sisk crash driver not found for mega on: September 30, 2011, 04:24:05 pm

AARG!  I went to the site, went to VCP Drivers, downloaded "Installation Guides". They said unzip driver file to a location on your disk. I unziped them to my downloads directory  Then one step said" Select "Search for best drivers in these locations" and enter path "c:/cdm 2.02 02". There is no such directory! There was a directory in the downloads directory called  "CDM20814_CHQL_Certified" so I entered that. There were 2 inf files( ftdibus, ftdiport and I tried both with same result. When I got back to search window nothing was there.  Then I found these files are already installed in the Arduino directory. Tried those with same result.I could never get past this point.

Jim
145  Using Arduino / Installation & Troubleshooting / Re: After hard sisk crash driver not found for mega on: September 29, 2011, 09:32:01 pm
Which Mega?  One with an 8u2 or FTDI chip?
The one with FTDI

Jim
146  Using Arduino / Installation & Troubleshooting / After hard sisk crash driver not found for mega on: September 29, 2011, 09:20:09 pm
I had a hard drive crash. Reloaded XP on new hd (500G-WOW), loaded Arduino 1.0. When I plug in the mega I got error from windows. It started the new hardware dialog. It could not find a driver for the board. Should not the driver be loaded with the Arduino Environment? If not, where do I find it. Google did not help! Before I was using Arduino 022, should I go back?

Jim
147  Development / Suggestions for the Arduino Project / Find and fix the stk500_getsync(): not in sync: resp=0x00 problem on: August 31, 2011, 08:50:12 pm
I see many posts where people have encountered this message

avrdude: stk500_getsync(): not in sync: resp=0x00
stk500_disable: protocol error, expect=0x14, resp=0x51

I am one! It seems the processor is bricked. I know is my case replacing the processor fixed the problem.

Jim
148  Using Arduino / Installation & Troubleshooting / Re: Will upgrade to optiboot solve the stk500_getsync(): not in sync problem? on: August 23, 2011, 11:29:45 am
I will keep one board for continuing to solve this.  Maybe i will install Optiboot and see what the differences are. Unfortunately the Mega is mounted deep within my project. I used the Duemilanove as a test bed for various modules. I need to move on right now to get things completed..


I am not sure my skill level is up to a remote control scope.

Jim
149  Using Arduino / Installation & Troubleshooting / Re: Will upgrade to optiboot solve the stk500_getsync(): not in sync problem? on: August 22, 2011, 08:11:29 pm
If rein0zn finds it difficult with 2 hands, he should try with one. I went through multiple tries but had no control over timing. The timing was totally random. I have given up. I ordered two Atmega 328 processors today. Hopefully this will solve my problem, but it is an inelegant solution. Looking over the older posts, this shows up regularly. Maybe it should be a sticky topic of it's own.

Jim 
150  Using Arduino / Installation & Troubleshooting / Re: Will upgrade to optiboot solve the stk500_getsync(): not in sync problem? on: August 21, 2011, 12:17:07 pm
Sorry I was slow responding, I had to down to Denver yesterday.

I think I was fast enough hitting reset. The message was same as always:

Binary sketch size: 450 bytes (of a 30720 byte maximum)
C:\Arduino\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Arduino\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM6 -b57600 -D -Uflash:w:C:\DOCUME~1\Owner\LOCALS~1\Temp\build5137574932139399309.tmp\null.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Arduino\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM6
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.

Thank you too! I really appreciate the time you have put in on this!! My project is to automate the rolling roof of my observatory. I have trouble doing that now. I am slowly putting together the hardware. Arduino was perfect for my project because a Sensor board and some functional bricks allowed me to assemble it without soldering, somewhat hard with one hand.

Jim

Pages: 1 ... 8 9 [10] 11 12 ... 14