Show Posts
Pages: 1 2 [3] 4 5 ... 3270
31  Using Arduino / Project Guidance / Re: Yet Another Motoduino! Gearhead plays with soldering gun. on: August 21, 2014, 08:47:08 am
So far the shopping list is
You forgot the whiskey, you idiot!  smiley-cool

GPS logging is not a must
I'd just add a commercial GPS which already does the logging and speed calculations and shows maps, etc.

How does the current mangled speedometer get data? Is it mechanical? My Harleys haven't used mechanical means since the 90's.
32  Using Arduino / Project Guidance / Re: Reading a current transformer on: August 21, 2014, 08:33:39 am
50 HP are too many HP: be careful.
There's no such thing as too much horsepower.  smiley-cool

The advice is sound, though.
33  Using Arduino / Project Guidance / Re: Detect beeping sound on: August 21, 2014, 08:27:37 am
Possible to do so?
Give it a try. You've got nothing to lose.
34  Using Arduino / Project Guidance / Re: Motion Sensor ->ATTiny-> RFTransmitter -> XBee->Arduino WiFi on: August 21, 2014, 08:23:27 am
Are there holes in my logic? Fundamental misunderstandings of the technology?
Could be. If the Arduino with WiFi shield is going to be using an XBee to receive data, the other devices must also be using XBees to transmit data.

If they are, then they have microprocessors built in, and the ATTiny at the transmitter nodes contributes nothing.

Other than that, the rest of the scenario is plausible. Personally, though, I'd skip the Arduinos altogether. An XBee with motion sensor at each node and a XBee and USB Explorer connected to a PC. Run an application on the PC that gets data from the XBee, and stores it locally or in a database (local or remote) if that's more convenient.
35  Using Arduino / Networking, Protocols, and Devices / Re: Serial1 - Atmega2560 on: August 21, 2014, 08:07:30 am
When I turn off the circuit and turn on, it no longer works, it confuses Serial1 with a SoftwareSerial
Not possible. The hex file that was uploaded shouldn't know anything about SoftwareSerial, so it can't possibly be confusing an instance of HardwareSerial for an instance of SoftwareSerial.

There seems to be something wrong with YOUR hardware setup.

I suggest that you try the code on a real Mega.
36  Using Arduino / Networking, Protocols, and Devices / Re: Xbee to Arduino Serial Response on: August 21, 2014, 08:05:00 am
One of the issues that I can see is that you are using the hardware serial pins to talk to the Serial Monitor AND to talk to the python application. I can see that one or the other is going to get confused.

I'm a bit surprised that there is nothing after the 2 digit response.

37  Using Arduino / Project Guidance / Re: multi port reading on: August 21, 2014, 07:38:43 am
Is it possible to gather datas from both device(xbee shield and gps module) in one sketch and one arduino?
Yes, it is.

Which way can you tell or suggest?
I suggest that you share the code you currently have, and describe what it isn't doing that you want it to do, and/or what it is doing that you don't want it to do.
38  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 07:32:16 am
Does that mean if I store char strings in an array I need to make sure the array hase one more char then I actually plan to use for each slot?

Would I write char(17) arrayName(4) or can I get away with char arrayName(4) ?
No and no.

When the type is char *, the values are NULL terminated strings, and the compiler takes care to allocate enough space for each string. And, you use [4], not (4), to define an array with 4 elements.

When you are defining an array that you are going to put data in later, that is when you need to be careful to size the array correctly.

Removing one space was not the correct solution. You are writing 16 characters, plus a NULL, into the array so that when you print the array on the LCD, the whole line gets blanked. In order to do that, you need to make the array able to hold 17 characters.
39  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 06:29:51 am
Sorry I don't know enough to understand what you mean.
char value[16];
you define an array that can hold 16 characters.

  sprintf(value, "      %1d         ", number);
you write 17 characters into it - 6 spaces, 1 digit, 9 spaces AND the terminating NULL.
40  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 06:18:13 am
I do not know what this "Unconditional printing of index" means. Will ask Google.
Right now, you are conditionally printing index. That is, you print it only if a condition is met - the switch has become pressed.

Move that statement outside of the if block.
41  Using Arduino / Programming Questions / Re: Can't make button increment my Array :( on: August 21, 2014, 05:47:16 am
   Can you remove the stupid comments from the code. None of them reflect what the code is actually doing, and just add visual clutter to the program.

   Naming the variables so that they appear to be related, like currMenuSwitchState and prevMenuSwitchState, makes for more understandable code, too.

   Variables are supposed to be named using camelCase, which means that EVERY word in the name is capitalized, except the first one. Your practice of random capitals for some words in the name makes for unreadable code.

   Unconditional printing of index might provide a clue.
42  Using Arduino / Programming Questions / Re: Controlling motors with pushbuttons (2 pin) on: August 21, 2014, 05:38:37 am
If each button has one pin to ground and one to an Arduino input that's configured
as INPUT_PULLUP it should be working
But, the pinMode is NOT INPUT_PULLUP. It is simply INPUT, which does NOT enable the internal pullup resistors, and digitalWrite() is not being used, either.

So, the switches are NOT wired correctly. Changing the mode to INPUT_PULLUP would fix that. Leaving the mode INPUT, and adding digitalWrite(thePin, HIGH); to turn on the internal pullup resistor would also fix it.
43  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Mega with Ethernet & SD Card on: August 21, 2014, 05:09:19 am
1.  When ethernet shield is used,  how many analog channels(out of 16) can be used
All of them.

2. Can ethernet and SD work together

3. Does use of ethernet shield affects analog values.
44  Using Arduino / Networking, Protocols, and Devices / Re: Xbee to Arduino Serial Response on: August 21, 2014, 04:55:00 am
There are still at least two problems with your code. First:
    while(Serial.available() > 0)
In my wildest dreams, I can not imagine that 10 milliseconds is enough time to shuffle out all that data AND have the server send back a response.

      char moistureSetting =; 
      if (moistureSetting >= 0 && moistureSetting <= 100)
I seriously doubt that the server responds with a BINARY value between 0 and 100. Instead, I suspect that the server responds with a value that is between 0 and 100 AS A STRING OF CHARACTERS. That is, if the value is 65, it is sending '6' and '5'. It is even more likely that it is sending something more like '6', '5', '<cr>', '<lf>'. You need to determine what the delimiter(s) is/are that mark the end of the string of data, and read and store data until the end of packet marker arrives, appending a NULL to the array after each character is stored, and then call atoi() on the stored string when the end of packet marker arrives.

For now, move the first Serial.println() statement to setup(). Then, in loop(), simply read any data that arrives, and print the value:
void loop()
   if(Serial.available() > 0)
      char c =;
      Serial.print(c, HEX);
      Serial.print(' ');

Show us the output that this produces.
45  Using Arduino / Networking, Protocols, and Devices / Re: Sim900 & xively on: August 21, 2014, 04:37:33 am
Clearly not. So, quit bumping this thread, and be the first.
Pages: 1 2 [3] 4 5 ... 3270