Show Posts
Pages: 1 ... 25 26 [27] 28 29 ... 67
391  Using Arduino / Programming Questions / Re: Please help me with "int function()" ! on: February 12, 2013, 06:46:23 pm
   input = getKeyboard;

You probably meant to call the function:

   input = getKeyboard();

392  Using Arduino / General Electronics / Re: The ants come marching in (and release magic smoke) on: February 12, 2013, 08:15:02 am
Perhaps an ant farm shield would make a good organic random number generator project.

393  Using Arduino / Project Guidance / Re: Controlling Arduino from an exernal (nice) webpage on: February 12, 2013, 07:41:14 am
Bitlash Commander might be worth a look for your application.  The code is available on GitHub here:

There's a sketch for the Arduino side that comes with Bitlash ( called "ethernetcommander.ino".  It knows how to receive and execute Bitlash commands over the 'net, and how to send notifications upstream to the server.  You can customize the sketch for your application.

Then there's the Bitlash Commander server.  It talks to the Arduino over usbserial _or_  the 'net.  The server serves web pages which are control panels whose controls and indicators talk to the Arduino.  There's a graphical editor for the control panels, or you can roll your own in HTML/Javascript.

Commander is a node.js application that uses JSON to communicate with the Arduino and for real-time updates to the web browser content.

Good luck with your project,


Edit: There's a test server (with no Arduino connected) you can play with here:

394  Using Arduino / Displays / Re: Clear a specific line on: February 11, 2013, 12:39:49 pm
What does the data sheet say?  Got a link?

395  Using Arduino / Programming Questions / Re: sprintf problem on: February 11, 2013, 08:29:20 am
Krupski, that is a cool feature addition.  If you want it to live forever, get it into the Arduino mainline by packaging up and posting a pull request to the core guys on the Arduino github:

396  Using Arduino / General Electronics / Re: Servo Issues on: February 10, 2013, 07:39:44 pm
Have you tried the Servo library examples?

File -> Examples -> Servo

397  Using Arduino / Programming Questions / Re: morse code flasher - lookup table question on: February 10, 2013, 07:18:40 pm
Interesting project.  I use a slightly different approach in the example morse transmitter that ships with Bitlash that may be worth considering. 

In this implementation, the morse data is encoded as a table of bytes, bit-packed.  Three bits of length and five bits of morse data for each character, with a little overflow table for symbols that don't fit.  All in PROGMEM, of course.

Code is here for the taking:

Good luck with your project,

398  Using Arduino / Programming Questions / Re: Newbie Frustration on: February 09, 2013, 05:51:22 am

if (Serial.available() > 0){
    for (int i=0; i < 5; i++){
       input[i] =;

You're reading five bytes when you're only guaranteed to have "more than zero" available.  When you read a byte that isn't there, you get -1 which prints as the y with umlaut.

Perhaps a check for > 5 would work better?

399  Using Arduino / Programming Questions / Re: Simple HTTP POST to Wifi Thermostat. HELP NEEDED on: February 07, 2013, 06:44:26 am
Also, not sure if this is a factor but when viewing one of the web pages that contains setting info from the browser, it appears to only be returning TEXT. the text on the web pages is as follows:


This is as expected; it's what a JSON response body looks like.  Your POST body will look similar but simpler since it only contains the one parameter you want to change.

The link to the api i send in my first post says the data can be added to responses of GET and POST methods.

Yes.  Your POST will consist of three lines:

1. POST /tstat/remote_temp HTTP/1.1
2. A blank line
3. The POST body containing your JSON-encoded parameter data: {"destruct_time":72}

As Paul says, posting your code will get better help.

400  Using Arduino / Programming Questions / Re: Simple HTTP POST to Wifi Thermostat. HELP NEEDED on: February 05, 2013, 05:37:47 pm
Have a look at Section 2.5 of the .pdf at the link.  That section provides examples using the gold-standard "curl" command line http tool.

The thermostat expects the data for the POST command to be in JSON format in the body of the post.  See Section 2.5.2 for a very clear example.

Unfortunately you can't do that from the browser command line for easy testing, but if you have or can get curl on your system you would find it helpful.

In the browser, GET of the various API urls should work fine to see the current settings, and should be your basic "is it up" test.

401  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Network causing severe battery drain on WiFi connected devices. on: February 04, 2013, 06:09:45 pm
The Arduino gets its revenge on all those devices with the fancy power saving.  Denial of service by battery depletion.  Not a novel attack, but possibly a novel vector.

402  Using Arduino / Programming Questions / Re: Averaging Digital input. on: February 04, 2013, 05:26:15 pm
Another simple filter for a isolated spikes is to require a data value change to be presented for two or three readings before believing it.

"Tell me once, tell me twice; what you tell me three times I believe is true."

(Edit: You could say this is a way to implement Arrch's proposal.)

403  Using Arduino / Programming Questions / Re: Meddling with the runtime clock on: February 04, 2013, 03:15:31 pm
I use code like this in the Bitlash rollover example (

extern volatile unsigned long timer0_millis;

void setMillis(unsigned long newtime) {
uint8_t oldSREG = SREG;
timer0_millis = newtime;

404  Using Arduino / Project Guidance / Re: GPS vehicle tracking System, WiFi enabled with Automated WPA Connection. on: February 03, 2013, 11:18:27 am
This may be out in left field, and apologies if so, but I have been wondering whether these Wi-Fi enabled SD cards would be a possible solution for applications like yours:

It looks like an SD card but has a Wi-Fi interface that can be configured to automatically upload everything on the card via wi-fi when it comes in range of a known access point.

405  Using Arduino / LEDs and Multiplexing / Re: Electronics 101, Ohm's law, Arduino and blue leds! Beginner here... on: February 02, 2013, 04:00:55 pm
100 ohms should be fine.  Perhaps if you post your code?

Pages: 1 ... 25 26 [27] 28 29 ... 67