Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Big project in my opinion on: July 10, 2014, 06:44:33 am
The response from arduino nano, regarding my last reply is:

2  Using Arduino / Project Guidance / Re: Big project in my opinion on: July 10, 2014, 06:36:12 am
Seams like it failes.. :/

Please explain what you mean.

If you followed the examples correctly, and it does not work, then you have a hardware fault.

However its far more likely you have made a mistake.

Double check everything.

I was trying to make an wireless connection with arduino nano as master, and arduino nano as slave.
from trying this code:
 Copyright (C) 2011 J. Coliz <>

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.

 * Example for Getting Started with nRF24L01+ radios.
 * This is an example of how to use the RF24 class.  Write this sketch to two
 * different nodes.  Put one of the nodes into 'transmit' mode by connecting
 * with the serial monitor and sending a 'T'.  The ping node sends the current
 * time to the pong node, which responds by sending the value back.  The ping
 * node can then see how long the whole cycle took.

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"

// Hardware configuration

// Set up nRF24L01 radio on SPI bus plus pins 9 & 10

RF24 radio(9,10);

// Topology

// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

// Role management
// Set up role.  This sketch uses the same software for all the nodes
// in this system.  Doing so greatly simplifies testing. 

// The various roles supported by this sketch
typedef enum { role_ping_out = 1, role_pong_back } role_e;

// The debug-friendly names of those roles
const char* role_friendly_name[] = { "invalid", "Ping out", "Pong back"};

// The role of the current running sketch
role_e role = role_pong_back;

void setup(void)
  // Print preamble

  printf("ROLE: %s\n\r",role_friendly_name[role]);
  printf("*** PRESS 'T' to begin transmitting to the other node\n\r");

  // Setup and configure rf radio


  // optionally, increase the delay between retries & # of retries

  // optionally, reduce the payload size.  seems to
  // improve reliability

  // Open pipes to other nodes for communication

  // This simple sketch opens two pipes for these two nodes to communicate
  // back and forth.
  // Open 'our' pipe for writing
  // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)

  //if ( role == role_ping_out )

  // Start listening


  // Dump the configuration of the rf unit for debugging


void loop(void)
  // Ping out role.  Repeatedly send the current time

  if (role == role_ping_out)
    // First, stop listening so we can talk.

    // Take the time, and send it.  This will block until complete
    unsigned long time = millis();
    printf("Now sending %lu...",time);
    bool ok = radio.write( &time, sizeof(unsigned long) );
    if (ok)

    // Now, continue listening

    // Wait here until we get a response, or timeout (250ms)
    unsigned long started_waiting_at = millis();
    bool timeout = false;
    while ( ! radio.available() && ! timeout )
      if (millis() - started_waiting_at > 200 )
        timeout = true;

    // Describe the results
    if ( timeout )
      printf("Failed, response timed out.\n\r");
      // Grab the response, compare, and send to debugging spew
      unsigned long got_time; &got_time, sizeof(unsigned long) );

      // Spew it
      printf("Got response %lu, round-trip delay: %lu\n\r",got_time,millis()-got_time);

    // Try again 1s later

  // Pong back role.  Receive each packet, dump it out, and send it back

  if ( role == role_pong_back )
    // if there is data ready
    if ( radio.available() )
      // Dump the payloads until we've gotten everything
      unsigned long got_time;
      bool done = false;
      while (!done)
        // Fetch the payload, and see if this was the last one.
        done = &got_time, sizeof(unsigned long) );

        // Spew it
        printf("Got payload %lu...",got_time);

// Delay just a little bit to let the other unit
// make the transition to receiver

      // First, stop listening so we can talk

      // Send the final one back.
      radio.write( &got_time, sizeof(unsigned long) );
      printf("Sent response.\n\r");

      // Now, resume listening so we catch the next packets.

  // Change roles

  if ( Serial.available() )
    char c = toupper(;
    if ( c == 'T' && role == role_pong_back )

      // Become the primary transmitter (ping out)
      role = role_ping_out;
    else if ( c == 'R' && role == role_ping_out )
      // Become the primary receiver (pong back)
      role = role_pong_back;
// vim:cin:ai:sts=2 sw=2 ft=cpp

The 'GettingStarted.ino file in the RF lib.

And it returned:
"Failed, response timed out.", as fare as i remenber at the moment.

The reason for using arduino nano as master for this moment, is to learn to know the nRF24l01+ module better.. Never tryed to play with them before..
3  Using Arduino / Project Guidance / Re: Big project in my opinion on: July 08, 2014, 05:10:31 am
Hey again and thanks for repleys smiley

The ideá is to controll virvariums, thow i later would like to use it for home automation.

At this moment im playing with 2 arduino nano's with nRF24l01, and using the lib, and "GettingStarted.ino" in arduino IDE.

The setup is from the link BulldogLowell provided:

Seams like it failes.. :/

Any ideá how to coutinue?
4  Using Arduino / Project Guidance / Big project in my opinion on: July 07, 2014, 08:04:21 pm
Hi Arduino Lovers and Dev's.

First, sorry if im confusing or mis-spelling, my English is getting quite old.

I've got this big project in mind, not sure how to describe it, but here it goes.

I want to make some simple 'clients' with arduino NANO (v3), and have one master controller, and i want them to talk to each other with nRF24l01.

Description of clients:
All Arduino Nano's are equipted with one nRF24l01, one relay, and one DS20B18.

The master controller:
Is an arduino board, not sure wich yet, it should have one nRF24l01, some buttons, an display of some kind (Maby an I2C controlled display?) and one RTC for time accarucy.

The master arduino should keep track of:
-> time
-> clients
-> temperature

So if i tell master arduino that client 01 should keep heat at 22 Deg Cel from 20:00 evening to 08:00 morning, and rise 1 Deg Cel each 30 minut, then client 01 should turn on relay from DS18B20 readings.

Seams and sounds very hard, i've got most components and modules at the moment, only missing an display of some kind.

I use a lot of time with arduino normaly, and wouldn't say im beginner, nor an expert.
I program a whole lot in my sparetime to (Mostly PHP and some shell in linux) so im not completly lost.

Thow i could use some help getting started.
Im currently trying each module, with some of my boards, for testing and getting to know the modules and how they work.

Also i work alot with DesignSpark PCB for PCB designing, so the end result should be more 'proffesionel' ending.

Can anyone guide me?
I've got 10-12 hours a week for this project.

Thanks & Regards:
Danni Hansen - Denmark.
5  Using Arduino / Interfacing w/ Software on the Computer / Re: multi-purpose project, storage arduino info on ARM device on: April 01, 2012, 09:14:05 am
Hello Graynomad.

Greath, seams like you understood what i wanted smiley
I have looked at the Arduino MEGA 2560 - R3, seams like its going to be that board smiley
More easy, than using an Arduino UNO with a lot of Shift Registers smiley

Thanks for reply.
Regards from:
Danni Hansen - Denmark.
6  Using Arduino / Interfacing w/ Software on the Computer / Re: multi-purpose project, storage arduino info on ARM device on: March 30, 2012, 04:28:13 pm

Hmm, as i see it, im asking how to program the arduino board, and choosing an board with enoughf I/O (pins) to do the project, and how to program the arduino board from a device, so i can store infos from sensors on a default board (such as raspberry PI)

smiley Thanks.
Regards from:
Danni Hansen - Denmark.
7  Using Arduino / Interfacing w/ Software on the Computer / multi-purpose project, storage arduino info on ARM device on: March 30, 2012, 04:00:41 pm
Okay, im not sure if i got the right forum, or category, but here's one of the many projects.

I want to make a project that can be used for many diffrent projects.

The main goal is to communicate arduno with the Raspberry PI board that im getting soon, But, the problemes comes at the arduino part, i want more I/O (Pins) on the arduino board than what the Arduino Uno can offer.

I need to control at 4 DC step motors (With home-build H-bridges), a couple of sensors (Humidity and Heat sensors, even light sensors (LDR)), and at last, some relay's (4 relays should do it!)
So im kinda expecting 32-40 I/O (Pins), more would be nice to!

The sensors should write to a text file, on the raspberry PI board (Witch runs linux i hope), the more advance part is that i should be abel to write a command from a terminal from far distance, that can control the motors/relays on request.

The qustion is how to catch the project at the right angle, so i make this come true for me.

I know the following:
The raspberry board has some USB ports, so i can make it wireless via the ethernet, so i can set it up to an router, and then on the net, that part is easy enoughf. Making some of the Arduino code is not that hard eather. The hardware is almost easy for me to.

The problem comes at storing the data from sensors on the raspberry board.
I've never worked with that big of a project, but almost every of my big projects, requires this setup for working.

Im looking forward for responces.
Thanks in advance, and sorry for bad English.
Regards from:
Danni Hansen - Denmark.
8  Using Arduino / Audio / Re: CD4512BE and inputs on: August 22, 2011, 12:15:38 pm

The idéa was to take a jack input, and then with some pot-meters/variabel-resistors on the multiplexer to the arduino, to fx. pitch or speed-up the sound.. Or whatever that can be done smiley

9  Using Arduino / Audio / Re: CD4512BE and inputs on: August 22, 2011, 04:12:46 am
Oh, sorry for the misplacing of topic.

Hmm, i want to make some kind of pitch in start, and whatelse you can do with arduino uno boards and programming smiley
10  Using Arduino / Audio / CD4512BE and inputs on: August 22, 2011, 04:05:54 am

Could anyone show me a simple way to manipulate sounds with arduino and the 4512 chip?

The idéa was to take this chip, and also making a input and output channel for sound/jack-plug..


Thanks in advance, im allready a little lost on the searching area, couldn't find anything.

11  Using Arduino / General Electronics / Re: Saving data to a real Harddrive on: August 22, 2011, 04:02:26 am
Hey all.

Thanks for reply and sorry i didn't reply befor now.

I think its just best i tryout the basic stuff first... smiley

12  Using Arduino / General Electronics / Saving data to a real Harddrive on: July 06, 2011, 08:14:42 pm
Hello Arduino ppl.

First i would like to know if it's posible to save data (fx. temperature data, distance data and so on), on a real harddrive from arduino?

The reason im asking this, is because, if i wanted to make a robot some day, it would help me a lot to save the data the sensors recive for both statistic use and for helping the robot to "learn".

Anyone that can tell me if thats posible?

Regards from Denmark (DK)
13  Using Arduino / Programming Questions / Re: Serial programming and php on: June 20, 2011, 11:18:39 pm
Hey Paul.

Thanks for reply.

Can you code PHP? If yes, a little code would be greath :-)
Cause im not sure i understand what you ment.

Thanks again
14  Using Arduino / Programming Questions / Re: Serial programming and php on: June 19, 2011, 08:02:37 am
this is the attachment

i've also included the pde file...
15  Using Arduino / Interfacing w/ Software on the Computer / Re: Some wierd "Error" when using serial monitor on: June 19, 2011, 07:55:47 am
How esactly do i do that in code?

How should the script look like?

Thanks for the reply.
Pages: [1] 2