Show Posts
Pages: 1 2 [3] 4 5 ... 27
31  Using Arduino / Installation & Troubleshooting / Re: Uno Rev.3 3.3V Source on: April 30, 2012, 05:49:55 pm
For I2C level shifting this circuit from Philips is great: App note AN10441.pdf and an97055.pdf.  I built one a while back and it's working well.  Two 5 cent mosfets, 4 resistors, done. I used 2N7002P mosfets, 3.3K pull-ups on the 3.3V side and 4.7K pull-ups on the 5V side.
32  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01 and Mirf library problem please help! on: April 30, 2012, 06:30:01 am
It's pretty hard to tell what's wrong without seeing your code.  If you post it you will get a better response.

You could also try this library and the rfstream examples. Although I've only used it with the nRF24L01+, but I understand the nRF24L01 is mostly compatible.
33  Using Arduino / Networking, Protocols, and Devices / Re: Connecting a device to wireless router on: April 29, 2012, 08:53:04 pm
When you research a shield to use with it, be careful to find one that has proper 5V to 3.3V level shifting on the data in pin for the module.  I've listed a couple here, as well as a couple to avoid:
34  Using Arduino / Project Guidance / Re: Wireless communication from Arduino to PC on: April 28, 2012, 02:55:47 pm
Thanx for the help guys,
I had seen that pdf.
I am communicating from Arduino to PC. No programming is required at the PC. Need to program the arduino. They have given a code for a microcontroller,can any one translate it for me.

I connected the transmitter's TX pin to Arduino's TX pin(pin#1), should i write my data to the TX pin or should i just make the TX pin High and use Serial.print.
Can any one tell me what is the use of TX pin and how to send the data?

Urgent help required. smiley-sad

Those modules have an RS232 interface suitable for direct connection to a PC. It's not suitable for direct connection to an Arduino. You'll need a level shifter like this one, or a MAX232.
35  Using Arduino / Networking, Protocols, and Devices / Re: Connecting a device to wireless router on: April 28, 2012, 02:28:34 pm
The Roving Networks WiFly RN-XV is a good low-cost option.
36  Using Arduino / Networking, Protocols, and Devices / Re: making arduino uno into a USB keyboard on: April 28, 2012, 02:23:19 pm
Take a look at my blog Arduino Hacking for all sorts of HID goodies. The code works on Rev 3 UNOs also.
37  Using Arduino / Networking, Protocols, and Devices / Re: rf24HQ: a new library for the nRF24L01+ RF transceiver. on: April 24, 2012, 03:10:18 pm
Hi Quest,

The scanner shows an approximate measure of the signal strength at each frequency by estimating how busy each frequency is. It does this by checking how many times it sees a signal strength of -64dBm or higher when sampling the frequency 200 times.

The frequency is 2400MHz plus the channel, so channel 90 is 2490MHz.

If you have your second radio powered off or not transmitting, then the scan will show you which frequencies are in use in your environment. You should choose a clear frequency for the radio that is not being used, and at least a few channels away from any active channels.
38  Using Arduino / Networking, Protocols, and Devices / Re: RN-XV WiFly Module & XBee Shield compatibilty on: April 23, 2012, 02:31:46 pm
I've got the same issue, not easy to make these devices working together :

- many RN XV sketches available are using "soft serial" library, and XBEE shield needs Serial library
- try to send datas to Pacghube and I can't..

Any ideas ?

Many thanks
The use of software serial in those example sketches is optional. You can use hardware serial instead.

What library are you using? Take a look at the readme in my library here: It shows you how to use hardware serial.
39  Using Arduino / Networking, Protocols, and Devices / Re: RN-XV WiFly Module & XBee Shield compatibilty on: April 23, 2012, 02:25:28 pm
With this one, only Serial port RX/TX is working :

XBEE board Arduino XBee Shield (

You've got no other choice, because the electronic circuit is making like that !

Cut off pins 0 and 1, connect jumper wires from 0 to 8 and 1 to 9. Instant software serial support.
40  Using Arduino / Project Guidance / Re: pc keyboard with arduino? on: April 23, 2012, 02:20:51 pm
With the Uno you can reprogram the atmega8u2 or atmega16u2 (rev 3 Uno) to be a USB HID keyboard.  Check the links here in the playground:

Guys, I bought the arduino UNO rev 3 just to do something more of a simple pc-keyboard. So i would like to know how I can install this on my arduino:
Can someone give me some instructions please?
Thank you very much!

Take a look at the earlier entries on my blog, like

You load the keyboard firmware by putting the UNO into DFU mode and using dfu-programmer (OSX, Linux) or flip (windows).
41  Using Arduino / Networking, Protocols, and Devices / Re: rf24HQ: a new library for the nRF24L01+ RF transceiver. on: April 23, 2012, 03:25:07 am
Hi Rob,

thanks for taking a look.

A quick look (not going to use the lib fro now)

void rf24::tx(const void *data, uint8_t len, uint8_t max)
  for (uint8_t ind=0; ind < len; ind++) {
    if (ind < max) {
      transfer(((uint8_t *)data)[ind]);
    } else {

can be simpler I guess . You don't want to send all those zero's or do I miss something?  (RX idem)
void rf24::tx(const void *data, uint8_t len, uint8_t max)
  if (len < max)
    for (uint8_t ind=0; ind < len; ind++) transfer(((uint8_t *)data)[ind]);
  } else {

The function is intended to be used internally to write data into registers.  The case where it is used to transfer zeros is for the send() function where the user provides less data than the current packet length, so the tx() function fill out the rest of the tx buffer with zeros.

For rx(), yes I can probably not bother reading in zero's - I just haven't experimented with reading fewer bytes than the register holds yet.

functionname mismatches content ? as also an RX ADDR is set,...
void rf24::setTxAddr(const void *addr)
    writeReg(RX_ADDR_P0, (const uint8_t *)addr, RF24_ADDR_LEN);
    writeReg(TX_ADDR, (const uint8_t *)addr, RF24_ADDR_LEN);

Good point.  The RX_ADDR_P0 address is set for use with the auto-ack feature.  I'll update this so it only sets the RX address if auto-ack is enabled, and I'll have the enableAck() function copy the TX address to RX_ADDR_P0.

this code is blocking, you might add a test function   boolean canSend();  so the user has the choice to test is it would block?
void rf24::send(void *data, uint8_t size)
    while (isSending(false));

Yes it blocks. The user can call isSending() to see if the tx is busy - which I think is the same as canSend()?

I've considered ways to support all three TX buffers, but I haven't worked out a way to let the user work out if a transmit was successful in this case. Using only one TX buffer means gotAck() works correctly.


    if (delay < 1) {
delay = 1;
    delay = (delay + 249) / 250;
    if (delay > 15) {
delay = 15; /* Max 4000us */

delay = constrain(delay,1,15);  // simpler ?

why not test the value of start too? > 125?
void rf24::scan(uint8_t *chans, uint8_t start, uint8_t count, uint8_t depth)
    uint8_t end = start+count;

    if (end > 125) {
end = 125;
Okay I can make this a bit safer :-).

So some small remarks, in general it looks well done.

Thanks for sharing!

42  Using Arduino / Networking, Protocols, and Devices / Re: Roving Networks RN-XV + Arduino Wireless Proto Shield (rev 3) on: April 22, 2012, 08:30:41 pm
I didn't get one thing. You are not using a Wifly library in Arduino code. How can it connect wirelessly without that? Did you also make a physical change in Arduino Proto shield?
Do you have the code for with the slider version ? Would be great if you could share pin connections.

Also you wrote:

What I may not make clear is that I configured the RN-XV manually before loading the sketch.

I connect the RN-XV to the computer USB via the arduino. Program it using the commands from the manual.
I associate it with my wireless network, I assign a manual ip address which I use in the Ardumote programmable buttons

So do we have to make that configuration as well with that FTDI stuff? Ports you use will be different in our case? Those parts you didn't explain smells really tricky..

The WiFly is actually a pretty easy module to use. The tricky part is that you have to read the manual to work out how to use it.
43  Using Arduino / Audio / Re: MIDI through usb on: April 22, 2012, 03:59:28 pm

You probably could have purchased another UNO for the same price, and used that as an ISP programmer and second serial interface via software serial.

Another option is to have your sketch send ASCII commands via the serial monitor, and then once you're happy with what its doing switch it to binary commands and load the MIDI firmware to the 8u2.

I'd recommend taking the "risk".  You'll learn some useful skills and get a native USB MIDI device out of the effort.
44  Using Arduino / Networking, Protocols, and Devices / Re: ÍPAddress does not name a type on: April 22, 2012, 02:27:25 pm
I'd suggest getting rid of the accent above the "I".
45  Using Arduino / Networking, Protocols, and Devices / rf24HQ: a new library for the nRF24L01+ RF transceiver. on: April 22, 2012, 06:57:46 am
I've released a library for the nRF24L01 here on github: Its version 0.1, but it seems to be stable and I think its easier to use the Mirf and should be easy to extend.

It includes a Stream class (RFStream) that operates on top of the radio's packet interface. It lets you use the familiar available(), read(), and print() stream functions with the radio. It has example sketches for the streamer, and also for the scan function that lets you implement a basic RF scanner across the radio's 2.4GHz spectrum.

If you try it out and find problems, or its missing features, feel free to open an issue on the github project for support. I'll be working on it to add documentation for the functions, and to add features like full shock-burst support with 6 receive channels.

Here's the streamer example sketch (tested on an UNO):

 * rfstream1.ino rf24HQ stream demo.
 * Sends all characters received from the serial monitor to the partner radio.
 * Sends all characters received from the partner radio to the serial monitor.
 * Run rfstream2.ino on the partner radio to connect to this sketch.
 * Released to the public domain.

 * The nrf24l01+ module should be connected to as follows:
 *    rf24    atmega328
 *    ----    ---------
 *    GND  -> GND
 *    VCC  -> 3.3V
 *    CE   -> digital pin 8
 *    CSN  -> digital pin 9
 *    SCK  -> digital pin 13
 *    MOSI -> digital pin 11
 *    MISO -> digital pin 12

#include <SPI.h>
#include <rf24HQ.h>

rf24 rf(8,9,100,RF24_MAX_SIZE);
RFStream rfstream;

const char myAddress[] = "rad01"; /* The rx address for this radio */
const char txAddress[] = "rad02"; /* Send data to this address */

void setup()
    rf.begin((Print *)&Serial);
    rfstream.begin(&rf, (Print *)&Serial);

    rf.setRxAddr(1, myAddress);

    /* Turn on auto-ack, 1000 microsecond timeouts, 15 retries */
    rf.enableAck(1000, 15);

    Serial.println(" ready");

    rfstream.println(F(" ready"));

void loop()
    if (rfstream.available()) {
    if (Serial.available()) {
        char ch =;
Pages: 1 2 [3] 4 5 ... 27