Show Posts
Pages: [1] 2
1  International / Deutsch / Re: 433 MHz Funkthermometer decodieren on: June 13, 2013, 03:07:30 pm
I own a Thierry Mugler wireless weatherstation. I ported code from Roel http://roel.reijerse.net/thierry/ to Arduino and it works fine.
2  Using Arduino / Programming Questions / Re: What is the URL of my buttons? on: January 02, 2013, 10:57:02 am
Thanks all for your replies. I nolonger need to find the URL with the same parameters as my http POST message.  I figured out how to read the paremeters from a http POST. Thanks anyway!
3  Using Arduino / Interfacing w/ Software on the Computer / Re: Twitter library 1.3.0 connection failed. on: January 02, 2013, 04:19:56 am
I added : byte gateway[] = {   192, 168, 1, 254 };
and changed: Ethernet.begin(mac,ip); to Ethernet.begin(mac,ip, gateway, gateway);
I also found that sending same messages twice are blocked by twitter.
4  Using Arduino / Programming Questions / Re: What is the URL of my buttons? on: December 29, 2012, 07:17:21 am
Aqualize, thanks for your useful reply. I read a bit  about GET and POST. My HTML page uses POST and then the parameters are not not found in the URL but in the message body. If I want to send parameters through URL then I must use GET. In the HTML I changed the method from POST to GET and then I saw the URL http://192.168.1.200/?command=eOn, that's what I am looking for. Next step is to handle the GET request in the code in my Arduino. Thanks again.
5  Using Arduino / Programming Questions / Re: What is the URL of my buttons? on: December 28, 2012, 11:32:55 am
When I type 192.168.1.200 in my browser I get the webpage with buttons that I expected. Please see the webserver GET code above how the webserver outputs HTML to my browser. The webserver  POST code searches for "command" in the name field and is able to pass value "aOn" or "aOff" to the function switchLights(value). I hoped that http://192.168.1.200/?name=command&value=aOn would do the same but I only see the EPIC FAIL message that the webduino webserver outputted. Does anyone have an idea what is the URL of my buttons? Clearly I don't understand yet how to pass parameters through the URL.
6  Using Arduino / Interfacing w/ Software on the Computer / Re: Twitter library 1.3.0 connection failed. on: December 27, 2012, 07:52:12 am
Thanks Quest UK, it seems to work
7  Using Arduino / Programming Questions / Re: What is the URL of my buttons? on: December 23, 2012, 08:53:35 am
Ok when I type http://192.168.1.100?name=command&value=aOn in the browser I get the message EPIC FAIL in the browser window. Still pretty lame? Please keep my parent out of this conversation. I appreciate people that actually help.
8  Using Arduino / Programming Questions / What is the URL of my buttons? on: December 23, 2012, 05:30:21 am
Hi, I have Uno R3, W5100 ethernetshield and IDE 1.0.1. I created a webserverpage with some buttons that executes some code in my program. The buttons works fine, but I also want to start these functions through an URL. I thought this was the URL, http://192.168.1.100?name=command&value=aOn but that does not work. Can anyone give me a hint? Below are some parts of my code.
Code:
void toggleLightCmd(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    bool repeat;
    char name[16], value[16];
    do
    {
      repeat = server.readPOSTparam(name, 16, value, 16);

      if (strcmp(name, "command") == 0)
      {
        switchLights(value);
      }
      else if (strcmp(name, "setup") == 0)
      {
        enableReceiver();
      }
    }
    while (repeat);
    server.httpSeeOther(PREFIX);
    return;
  }
  server.httpSuccess();/* for a GET or HEAD, send the standard "it's all OK headers" */
  if (type == WebServer::GET){  /* we don't output the body for a HEAD request */
    P(message) =
      "<html><head><title>Sesam</title></head>"
      "<body><form action='/' method='POST'>ELRO<br>"
      "A<button class='positive' name='command' value='aOn'>Aan</button> <button class='negative' name='command' value='aOff'>Uit</button><br>"
      "B<button class='positive' name='command' value='bOn'>Aan</button> <button class='negative' name='command' value='bOff'>Uit</button><br>"
      "C<button class='positive' name='command' value='cOn'>Aan</button> <button class='negative' name='command' value='cOff'>Uit</button><br>"
      "D<button class='positive' name='command' value='dOn'>Aan</button> <button class='negative' name='command' value='dOff'>Uit</button><HR>"
      "QUIG<br>1<button class='positive' name='command' value='eOn'>Aan</button> <button class='negative' name='command' value='eOff'>Uit</button><br>"
      "2<button class='positive' name='command' value='fOn'>Aan</button> <button class='negative' name='command' value='fOff'>Uit</button><hr>"
      "ALL<br><button class='positive' name='command' value='AllOn'>Aan</button> <button class='negative' name='command' value='AllOff'>Uit</button><hr>"
      "GARAGE<br><button class='positive' name='command' value='Garage'>Aan</button>"
      "<hr><button class='neutral' name='setup' value='setup'>Learn</button>"
     "</form></body></html>";
    server.printP(message);
  }
}
9  Using Arduino / Interfacing w/ Software on the Computer / Twitter library 1.3.0 connection failed. on: December 22, 2012, 12:24:48 pm
I have a Arduino Uno R3 with ethernetshield(W5100), Arduino IDE 1.0.1. My program has a webserver and a fixed ip address (192.168.1.200)  and I created some buttons on a website to execute some functions, that works fine. In one of the function I want to post a message to Twitter. I use the Twitter library 1.3.0 from here http://playground.arduino.cc/Code/TwitterLibrary. I followed the instruction. When the arduino has a fixed ip (Ethernet.begin(mac,ip)smiley-wink the connection fails. When it gets an IP from DHCP server(Ethernet.begin(mac)smiley-wink, connection is succesfull. Does anyone know why it fails when I use a fixed IP address? I want to use a fixed IP so I can forward an external incoming port to the fixed ip of the arduino.
10  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: November 16, 2012, 04:51:16 pm
Now all is clear to me, I wrote this summary to have all the information in one place and to share with you.

I wanted to have low voltage (brown-out) detection on my Arduino Uno R3 to prevent it from unexpected behaviour or even destroying my sketch when the 5V power supply drops below a certain level. I want to show how to correctly set the brown out detection. To set the brown-out detection a new bootloader with the setting must be burned to the Uno. I  have used 1 Arduino Uno to burn a bootloader to another Arduino Uno. The other Uno is used as an in-system programmer(ISP). Here's a description how to do that http://arduino.cc/en/Tutorial/ArduinoISP.

In the Arduino IDE (mine is 1.0.1) boards.txt contains bootloader settings of many different Arduino boards. On my computer the file is located here D:\programs\arduino-1.0.1\hardware\arduino\boards.txt. In that file you need to find the Uno.

Code:
##############################################################
uno.name=Arduino Uno
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
uno.build.variant=standard
##############################################################
A change must be made to one of these lines to set the fuses of the Uno.

To find the fuse settings this fuse calculator is useful. http://www.engbedded.com/fusecalc. For Uno select ATmega328P. The second table shows that the brown-out detection (BOD) level is set with the extended fuse. Bits 0 to 2 are used to set the voltage level. Bits 3 to 7 are not used. Playing around with the calculator shows that 0x04 is 4.3V, 0x05 is 2.7V, 0x06 is 1.8V and 0x07 is disabled BOD. The datasheet of the ATmega328P shows the same BOD level coding.

This means that the default setting of 0x05 for the Uno that came with the IDE is 2.7V. So the Uno already has brown-out detection enabled. That's interesting, because the Arduino Uno runs on a 16MHz external crystal. The datasheet of the ATmega328P shows that at 2.7V the maximum frequency for safe operation is 10MHz. So at 16MHz the minimum voltage for safe operation must be set to 4.3V. So extended fuse must be set to 0x04.

You now learned that it useful to change the brown-out detection level for your Uno. Don't forget to save the boards.txt file, restart the IDE, burn the bootloader and then burn your sketch. Happy brown-out detecting!
11  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: November 16, 2012, 03:46:58 pm
Hey, if the extended fuse is standard 0x05 then the Uno already has BOD enabled.
0x04=4,3V
0x05=2.7V
0x06=1.8V
0x07=disabled BOD
And then I actually changed from default 2,7V to 4,3V. I'm not sure if that is an improvement.
12  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: November 16, 2012, 02:02:46 pm
Welcome back all, I tried changing the extended fuses from 0x05 to 0xFC in boards.txt to get 4.3V level, but it did not work. It showed error :  ***failed;  avrdude: verification error, first mismatch at byte 0x0000 0xfc != 0x04 avrdude: verification error; content mismatch. Then I tried to change extended fuses to 0x04, then it worked! Thanks to the comment of Jack Christensen : "BTW, the top five bits of the efuse sort of "aren't there", so setting the efuse to 0x04 turns out to be the same as 0xFC."
13  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: October 16, 2012, 02:17:58 am
Page 54 of the datasheet shows that I can read a brown-out reset flag. And also the watchdog reset flag. That's nice to monitor.
14  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: October 15, 2012, 04:12:13 pm
@Jack, thanks for your reply! I will try tomorrow. Now it's bedtime!
15  Using Arduino / Microcontrollers / Re: Is there Brown-out detection for Arduino Uno? on: October 15, 2012, 03:58:31 pm
Yes I've read p48 of the datasheet and I'm using 5V through USB.
I found boards.txt in the IDE? It says:
Code:
##############################################################
uno.name=Arduino Uno
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
uno.build.variant=stand
###########################################################
According to http://www.engbedded.com/fusecalc I should change the extended fuses from 0x05 to 0xFC to get 4.3V level.
Let's try that.... but now what? Is that it? Do I need to burn a bootloader?
Pages: [1] 2