Show Posts
Pages: [1] 2
1  Using Arduino / Networking, Protocols, and Devices / Re: Using TPlink WR703N router for Arduino on: April 19, 2014, 07:26:44 am
See https://gist.github.com/probonopd/9594775 for running the Arduino Yun (Linino) software on the WR703N. So far, I succeeded with the Arduino Uno and the Arduino Mega, and can use them like a Yun when connected to the WR703N. Right now it is a bit hackish but with some fiddling I got it to work.
2  Products / Arduino Yún / Re: Need help to run the Bridge on (USB CDC) Serial rather than Serial1 on: March 30, 2014, 01:23:08 pm
Thanks sonnyyu, but I still would like to make this run with the Arduino Leonardo as well.
3  Products / Arduino Yún / Need help to run the Bridge on (USB CDC) Serial rather than Serial1 on: March 30, 2014, 07:31:01 am
I have an Arduino Leonardo connected to my OpenWrt-based router via USB. On the OpenWrt router, I have installed the Arduino-related components of Linino as documented on https://gist.github.com/probonopd/9594775 - this setup works for other Arduinos but not for the Leonardo so far, since the Bridge library is using Serial1 rather than Serial (which I would want) on the Leonardo.

I would like to use the Arduino Yun's Bridge library and run it on an Arduino Leonardo, but rather than using the hardware serial RX/TX pins I would like to communicate over the USB CDC serial connection.

At the end of Bridge.cpp I find:

Code:
// Bridge instance
#ifdef __AVR_ATmega32U4__
// Leonardo variants (where HardwareSerial is Serial1)
SerialBridgeClass Bridge(Serial1);
#else
SerialBridgeClass Bridge(Serial);
#endif

I change this to:

Code:
// Bridge instance
// Port which normally prints to the Arduino Serial Monitor according to pins_arduino.h
SerialBridgeClass Bridge(SERIAL_PORT_MONITOR);

But now I get:

Code:
libraries/Bridge/src/Bridge.cpp:244: error: no matching function for call to 'SerialBridgeClass::SerialBridgeClass(Serial_&)'
libraries/Bridge/src/Bridge.h:94: note: candidates are: SerialBridgeClass::SerialBridgeClass(HardwareSerial&)
libraries/Bridge/src/Bridge.h:92: note:                 SerialBridgeClass::SerialBridgeClass(const SerialBridgeClass&)

In Bridge.h I find:

Code:
// This subclass uses a serial port Stream
class SerialBridgeClass : public BridgeClass {
  public:
    SerialBridgeClass(HardwareSerial &_serial)
      : BridgeClass(_serial), serial(_serial) {
      // Empty
    }

    void begin(unsigned long baudrate = 115200) {
      serial.begin(baudrate);
      BridgeClass::begin();
    }

  private:
    HardwareSerial &serial;
};

extern SerialBridgeClass Bridge;

Can you help me to make the Bridge work over (USB CDC) Serial rather than Serial1?
4  Topics / Home Automation and Networked Objects / Re: RF outlet library on: October 14, 2013, 05:45:57 pm
Can't read the text on the small chip, but have you tried this?
https://code.google.com/p/rc-switch/

Using a "1pcs RF transmitter and receiver kit for Arduino project 433Mhz" from eBay you can try to listen to what the remote sends, and re-send that from the transmitter...
5  International / Deutsch / Re: Lowcost Funksender mit Arduino kompatibel? on: October 14, 2013, 05:32:44 pm
Mit welcher Frequenz funkt er denn?
Ich habe hiermit gute Erfahrungen gemacht:
https://code.google.com/p/rc-switch/

Ein "RF transmitter and receiver kit for Arduino 433Mhz" bekommt man auf eBay.com schon für unter 1 USD...
6  Using Arduino / Programming Questions / Re: ir proto hex code almost done need a little help though on: July 06, 2013, 07:13:35 pm
If you would like to send Pronto Hex with an Arduino sketch:
https://github.com/probonopd/arduino-infrared-pronto
7  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 17, 2013, 04:36:11 am
Awesome!

This kind of stuff is really hard to spot for someone coming from the Python world... Too bad compilers can't give an error in these cases... Again, thanks for your spot-on help!
8  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 17, 2013, 03:40:57 am
In the meantime, I have added some code to actually send Pronto Hex IR codes.
https://gist.github.com/probonopd/5793692

I think with really long strings like

Code:
SEND 0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0679 015B 0057 0016 0E6C

it crashes, even if I set the inputLength to something like 512. Using freeRam() I suspect I am running out of RAM. Idea: Can the routine be modified so that instead of reading the entire line into a string and processing the string, each chunk (up to the next space) is processed until everyting is in the array?
9  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 16, 2013, 05:53:14 pm
Awesome!

That was it indeed. I had "both"...

Also I notice that when the last character is a blank (" "), then it doesn't work. But that's not a problem if you know it :-) Thank you so much for your help.
10  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 16, 2013, 05:33:15 pm
This works, but only exactly once. If I send the same string a second time over the serial line, it doesn't work anymore.

I must be missing something obvious...
https://gist.github.com/probonopd/5793692
11  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 16, 2013, 12:24:52 pm
Well spotted, thanks. But it still doesn't work  smiley-mad

http://codepad.org/jylhWIuX
12  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 16, 2013, 10:19:47 am
Still having trouble... this compiles on the Arduino, but doesn't give any output when it should print the members of the array. What am I doing wrong?

http://codepad.org/1ysav622
13  Using Arduino / Programming Questions / Re: Convert string sent over serial to array of hex numbers on: June 16, 2013, 06:05:51 am
Thanks guix. The strol function will take care that the string "03de" coming from the serial line is correctly stored as hex 0x3de = 990? I figure that I need to use something like this

Code:
uint16_t value= strtol ("03de",NULL,6);

Would that be correct?

Here is an interesting example, which I modified a bit:

Code:
/* strtol example */
#include <stdio.h>      /* printf */
#include <stdlib.h>     /* strtol */

int main ()
{
  char input[] = "0000 0067 0000 000d";
  char * pEnd;
  long int li1, li2, li3, li4;
  li1 = strtol (input,&pEnd,16);
  li2 = strtol (pEnd,&pEnd,16);
  li3 = strtol (pEnd,&pEnd,16);
  li4 = strtol (pEnd,NULL,0);
  printf ("The decimal equivalents are: %ld, %ld, %ld and %ld.\n", li1, li2, li3, li4);
  return 0;
}

How could I change this to be a loop rather than hardcoded li1, li2,...?
14  Development / Other Software Development / Re: How to change Arduino IDE menu font size? on: June 16, 2013, 05:37:01 am
On Linux, I was able to solve this by creating a file called "fontsettings" with the following content:

Code:
style "small" {
        font_name = "Sans Condensed 8"
}
class "GtkWidget" style "small"

Now I have to

Code:
export GTK2_RC_FILES=$GTK2_RC_FILES:./fontsettings

and then launch Arduino. Of course you can integrate the export statement into the Arduino launch script.
15  Using Arduino / General Electronics / Re: Trying to assemble custom cables and housings? on: June 16, 2013, 05:30:04 am
Using the Hanlong HT-225D I am now happily crimping my own cables using Dupont connectors. Search eBay for "Jumper Wire Cable Housing" for the matching supplies.
Pages: [1] 2