arduino + nRF24L01

Hello..

this is a totally bland entry because of problems I have had with my real post:

Error: Sorry, you are not allowed to post messages containing active links to websites or images before you have posted 1 normal messages.

-mike

Hello :slight_smile: if this should go somewhere else, or if this question has already been asked or answered in another post, please let me know!

so, I am trying to get two arduino boards to communicate wirelessly, duemilanove, and uno, with the nRF24L01 from nordic, using the following break-out board from sparkfun: "Transceiver nRF24L01+ Module with Chip Antenna", and using the mirf library: playground/InterfacingWithHardware/Nrf24L01

The Mirf.zip download contains the following example code, only the first part of which I will include for brevity:

/**
 * A Mirf example to test the latency between two Ardunio.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 * This depends on the Spi Library:
 * http://www.arduino.cc/playground/Code/Spi
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

void setup(){
  Serial.begin(9600);
  /*
   * Setup pins / SPI.
   */
   
  /* To change CE / CSN Pins:
   * 
   * Mirf.csnPin = 9;
   * Mirf.cePin = 7;
   */

. when I compile this code with the arduino 0021 system, I get these errors, (again, only the first included for brevity:

In file included from C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp:38:
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\/Mirf.h:31:17: error: Spi.h: No such file or directory
In file included from C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp:38:
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\/Mirf.h:106: error: ISO C++ forbids declaration of 'SPI' with no type
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\/Mirf.h:106: error: expected ';' before '*' token
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp: In constructor 'Nrf24l::Nrf24l()':

changing the following lines:

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

to:

#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>

gets rid of the first error. This also appears to be a problem with the arduino 0017 environment. But this was a minor problem, I guess, because I could fix it. seems though that the correction should be applied to the nrf2l01 section of the playground..

That is not the only error though. With the correction, arduino 0017 gives the following errors:

C:\Users\mikethe1wheelnut\Desktop\arduino-0017\hardware\libraries\SPI\SPI.cpp: In static member function 'static void SPIClass::begin()':

C:\Users\mikethe1wheelnut\Desktop\arduino-0017\hardware\libraries\SPI\SPI.cpp:23: error: 'SCK' was not declared in this scope

C:\Users\mikethe1wheelnut\Desktop\arduino-0017\hardware\libraries\SPI\SPI.cpp:24: error: 'MOSI' was not declared in this scope

C:\Users\mikethe1wheelnut\Desktop\arduino-0017\hardware\libraries\SPI\SPI.cpp:25: error: 'SS' was not declared in this scope

I don't know how to solve this..

Arduino 0021 gives (again, only the first few lines given for brevity):

In file included from C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp:38:
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\/Mirf.h:106: error: ISO C++ forbids declaration of 'SPI' with no type
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\/Mirf.h:106: error: expected ';' before '*' token
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp: In constructor 'Nrf24l::Nrf24l()':
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf\Mirf.cpp:48: error: 'spi' was not declared in this scope
C:\Users\mikethe1wheelnut\Desktop

obviously the errors are different, the 0017 errors much simpler than the 0021 errors. The relevant libraries are all where they are supposed to be (I think...), in hardware/libraries for the 0017, and in libraries for 0021.

there you have it.. so.. anybody have the solution to these issues? hopefully others can avoid similar frustrations.

-mike :slight_smile:

The SPI class underwent significant changes for 0020/0021. You can't just rename Spi.h to SPI.h.

um.. ok..

so, any suggestions for how I might fix the problems? from what I can tell, this code is supposed to be a standard code that should work..

.. I should add that the reason I changed Spi to SPI is that I used sketch->import library-> SPI to bring in the library, and obviously, it came in as SPI, not Spi. .... so what you are saying is that.. I need the Spi library, not the SPI one..

ah?

it would appear that the library I needed was this one: Arduino Playground - Spi

I had to delete the SPI folder in the hardware/libraries of arduino 0017, and replace it with the one downloaded from the link above..

the code now runs in 0017. testing with 0021..

ok. tested and working in 0021. however, the SPI libraries had to be deleted. perhaps re-naming them (changing more than just upper and lower case) would allow both libraries to be used?

ok. got everything wired up, uploaded the programs to the arduinos.

problem 1) it would be nice to be able to monitor both com ports simultaniously (serial monitors), for sender, and reciever, but it seems I can only activate one of them at a time. is there any way to do this?

problem 2) more importantly, the system doesn't work. using print-line statements I have tracked the problem to when the reciever is to send it's response back to the transmitter, for the ping. it seems to transmit endlessly, the program essentially goes into an infinite loop. I presume that since it transmits endlessly, the reciever recieves endlessly, and since it never stops recieving, it can never print out it's ping.

any advice on how to get this working the way it should?

/**
 * An Mirf example which copies back the data it recives.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

void setup(){
  Serial.begin(9600);
  
  /*
   * Setup pins / SPI.
   */
   
  Mirf.csnPin = 8;
  Mirf.cePin = 7;

   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"serv1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(unsigned long);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  Mirf.config();
  
  Serial.println("Listening..."); 
}

void loop(){
  /*
   * A buffer to store the data.
   */
   
  byte data[Mirf.payload];
  
  /*
   * If a packet has been recived.
   */
  if(Mirf.dataReady()){
    
    do{
      Serial.println("Got packet");
    
      /*
       * Get load the packet into the buffer.
       */
     
      Mirf.getData(data);
    
      /*
       * Set the send address.
       */
     
     
      Mirf.setTADDR((byte *)"clie1");
    
      /*
       * Send the data back to the client.
       */
     
      Mirf.send(data);
    
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */
     
      while(Mirf.isSending()){
        delay(100);
      }
      
      Serial.println("Reply sent.");
    }while(!Mirf.rxFifoEmpty());
  }
}

the problem occurs here: Mirf.isSending() seems to never become false..

      while(Mirf.isSending()){
        delay(100);
      }

problem 1) it would be nice to be able to monitor both com ports simultaniously (serial monitors), for sender, and reciever, but it seems I can only activate one of them at a time. is there any way to do this?

Sure. Start two versions of the IDE. Set the port correctly for each instance. You can then open two serial monitors.

it seems to transmit endlessly, the program essentially goes into an infinite loop. I presume that since it transmits endlessly, the reciever recieves endlessly, and since it never stops recieving, it can never print out it's ping.

Without monitoring both ends, I don't think you can draw this conclusion. More likely, I think, is that the transmitter never get any acknowledgment that the message was received, so it keeps waiting.

Sure. Start two versions of the IDE. Set the port correctly for each instance. You can then open two serial monitors.

ok. I have two such versions open, 0017 and 0021. I presume this is what you mean? setting each to program a different arduino is not difficult, one has the uno option, the other doesn't, and the top one of the list is selected by default, it seems. the problem is, the right com port has to be selected for each, and this does not seem possible. as soon as one com port is selected for one, the other one changes to the same one. it would seem that the two are linked. so how can I get them to point to two different com ports? to be specific, if I have one com port open from 0017, and I go to 0021 to open the other one, as soon as I change the com port of the other one, the first com port closes. so two different com ports seems impossible.

as for your second answer, well, we have to resolve the above problem first, it would seem.. :slight_smile:

ok. I have two such versions open, 0017 and 0021. I presume this is what you mean?

clearly not! now I have two 0021 open, and have 2 com ports, com4 and com 5! ... I must have been tired last night :slight_smile:

ok. it works! I had forgoten about this, that two pins must be switched on the server side. I suppose that could be changed in the code.. :

void setup(){
  Serial.begin(9600);
  
  /*
   * Setup pins / SPI.
   */
   
  Mirf.csnPin = 8;
  Mirf.cePin = 7;

ok. I have two such versions open, 0017 and 0021. I presume this is what you mean?

I meant two instances of the same version.

When I do this, I have no problem opening two Serial Monitors using two different COM ports.

ok..

I have several questions. where to begin..

the simplest one:

here is my code: client (transmitter)

/**
 * A Mirf example to test the latency between two Ardunio.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 * This depends on the Spi Library:
 * http://www.arduino.cc/playground/Code/Spi
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

unsigned long potpin = 0;  // analog pin used to connect the potentiometer
unsigned long val;    // variable to read the value from the analog pin 

void setup(){
  Serial.begin(9600);
  /*
   * Setup pins / SPI.
   */
   
  /* To change CE / CSN Pins:
   * 
   * Mirf.csnPin = 9;
   * Mirf.cePin = 7;
   */
   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"clie1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(unsigned long);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  /*
   * To change channel:
   * 
   * Mirf.channel = 10;
   *
   * NB: Make sure channel is legal in your area.
   */
   
  Mirf.config();
  
  Serial.println("Beginning ... "); 
}

void loop(){
    val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180) 

  unsigned long time = millis();
  
  Mirf.setTADDR((byte *)"serv1");
  
  Mirf.send((byte *)&time);
  
  Serial.println((unsigned long) time);
  
  while(Mirf.isSending()){
  }
  Serial.println("Finished sending");
  
  delay(10);
  
  while(!Mirf.dataReady()){
    //Serial.println("Waiting");
  }
  
  Mirf.getData((byte *) &time);
  
  Serial.print("Ping: ");
  Serial.println((millis() - time));
  
  delay(1000);
}

and server(reciever)

/**
 * An Mirf example which copies back the data it recives.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

#include <Servo.h>
/* 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
*/
unsigned long val;    // variable to read the value from the analog pin

void setup(){
  Serial.begin(9600);
  
  /*
   * Setup pins / SPI.
   */
   
  Mirf.csnPin = 8;
  Mirf.cePin = 7;

   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"serv1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(unsigned long);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  Mirf.config();
  
  Serial.println("Listening..."); 
}

void loop(){
  /*
   * A buffer to store the data.
   */
   
  byte data[Mirf.payload];
  
  /*
   * If a packet has been recived.
   */
  if(Mirf.dataReady()){
    
    do{
      Serial.println("Got packet");

   
      /*
       * Get load the packet into the buffer.
       */
     
      Mirf.getData(data);

      /*
       * Set the send address.
       */
     
     
      Mirf.setTADDR((byte *)"clie1");
    
      /*
       * Send the data back to the client.
       */
     
      Mirf.send(data);
  Serial.println((unsigned long) data);
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */
     
      while(Mirf.isSending()){
        delay(100);
      }
      
      Serial.println("Reply sent.");
    }while(!Mirf.rxFifoEmpty());
  }
}

it works perfectly with the exception of this part of the receiver code:

      /*
       * Send the data back to the client.
       */
     
      Mirf.send(data);
  Serial.println((unsigned long) data);
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */

this line is the problem:

Serial.println((unsigned long) data);

it should be outputting a time, and therefore, the value should be changing. for all intents and purposes, I have not changed the code. it is still the same code as in the example in the arduino playground.

obviously, at this point, I have no idea what I am doing, which brings me to my other questions. there are several files and libraries involved, notably those here: Arduino Playground - Nrf24L01 . one of these links goes here: http://www.tinkerer.eu/AVRLib/nRF24L01 . but these files seem to be relevant to older chips, so I have no idea if they are still good for my application, using newer arduinos. Notably, the mirf files in both of these locations (the mirf files in the mirf.zip download, and those on the tinkerer site), are different. given that they are both linked to from the same arduino page, it is difficult to determine which is supposed to be the 'right' code.

ok, now for the question I need to know the answer to to answer all the other ones. the mirf.zip download includes mirf.cpp, mirf.h, and nrf24l01.h . these all have to work together, I can't see how it could be otherwise. however, nowhere in the 'processing source code', or in the .h files do I find any reference to mirf.cpp, so I find it hard to credit that it is being used.

anybody care to comment?

-mike..

data is an array of bytes. You can't just cast that to an unsigned long.

If you are sending an array of bytes that composes an unsigned long, you should receive the data the same way:

unsigned long sent;

Mirf.GetData(&sent);

The &sent passes an address where writing can begin, just like data (which is effectoively data[0] in this context).

ok..

for better or for worst, that did not work.. here is my code:

/**
 * An Mirf example which copies back the data it recives.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

#include <Servo.h>
/* 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
*/

void setup(){
  Serial.begin(9600);
  
  /*
   * Setup pins / SPI.
   */
   
  Mirf.csnPin = 8;
  Mirf.cePin = 7;

   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"serv1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(unsigned long);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  Mirf.config();
  
  Serial.println("Listening..."); 
}

void loop(){
  /*
   * A buffer to store the data.
   */
   
  byte data[Mirf.payload];
  
  /*
   * If a packet has been recived.
   */
  if(Mirf.dataReady()){
    
    do{
      Serial.println("Got packet");

   
      /*
       * Get load the packet into the buffer.
       */
     unsigned long sent;    // variable to read the value from the analog pin

      Mirf.getData(&sent);

      /*
       * Set the send address.
       */
     
     
      Mirf.setTADDR((byte *)"clie1");
    
      /*
       * Send the data back to the client.
       */
     
      Mirf.send(sent);
  Serial.println((unsigned long) sent);
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */
     
      while(Mirf.isSending()){
        delay(100);
      }
      
      Serial.println("Reply sent.");
    }while(!Mirf.rxFifoEmpty());
  }
}

I included the unsigned long sent both where it is, and at the begining of the program, and no difference. the error it generates is:

ping_server.cpp: In function 'void loop()':
ping_server:84: error: no matching function for call to 'Nrf24l::getData(long unsigned int*)'
C:\Users\mikethe1wheelnut\Desktop\arduino-0021\libraries\Mirf/Mirf.h:52: note: candidates are: void Nrf24l::getData(uint8_t*)
ping_server:97: error: invalid conversion from 'long unsigned int' to 'uint8_t*'
ping_server:97: error: initializing argument 1 of 'void Nrf24l::send(uint8_t*)'

as for:

The &sent passes an address where writing can begin, just like data (which is effectoively data[0] in this context).

I would like to say I understand it in it's entirety, but I don't. Suficient research and experience would surely rectify that.

ok, what there -is- is this:

extern void Nrf24l::getData(uint8_t * data) 
// Reads payload bytes into data array
{
    csnLow();                               // Pull down chip select
    spi->transfer( R_RX_PAYLOAD );            // Send cmd to read rx payload
    transferSync(data,data,payload); // Read payload
    csnHi();                               // Pull up chip select
    configRegister(STATUS,(1<<RX_DR));   // Reset status register
}

from mirf.cpp . I can only conclude that unsigned longs can't be sent, only uint8_t's ...

ok, conversion to uint8_t done:

/**
 * A Mirf example to test the latency between two Ardunio.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 * This depends on the Spi Library:
 * http://www.arduino.cc/playground/Code/Spi
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

uint8_t potpin = 0;  // analog pin used to connect the potentiometer
uint8_t val;    // variable to read the value from the analog pin 

void setup(){
  Serial.begin(9600);
  /*
   * Setup pins / SPI.
   */
   
  /* To change CE / CSN Pins:
   * 
   * Mirf.csnPin = 9;
   * Mirf.cePin = 7;
   */
   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"clie1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(uint8_t*);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  /*
   * To change channel:
   * 
   * Mirf.channel = 10;
   *
   * NB: Make sure channel is legal in your area.
   */
   
  Mirf.config();
  
  Serial.println("Beginning ... "); 
}

void loop(){
    val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 179);     // scale it to use it with the servo (value between 0 and 180) 

  unsigned long time = millis();
  
  Mirf.setTADDR((byte *)"serv1");
  
  Mirf.send((byte *)&val);
  
  Serial.println((uint8_t) val);
  
  while(Mirf.isSending()){
  }
  Serial.println("Finished sending");
  
  delay(10);
  
  while(!Mirf.dataReady()){
    //Serial.println("Waiting");
  }
  
  Mirf.getData((byte *) &time);
  
  Serial.print("Ping: ");
  Serial.println((millis() - time));
  
  delay(1000);
}
/**
 * An Mirf example which copies back the data it recives.
 *
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 *
 */

#include <Spi.h>
#include <Mirf.h>
#include <nRF24L01.h>

#include <Servo.h>
/* 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
*/
uint8_t sent;    // variable to read the value from the analog pin

void setup(){
  Serial.begin(9600);
  
  /*
   * Setup pins / SPI.
   */
   
  Mirf.csnPin = 8;
  Mirf.cePin = 7;

   
  Mirf.init();
  
  /*
   * Configure reciving address.
   */
   
  Mirf.setRADDR((byte *)"serv1");
  
  /*
   * Set the payload length to sizeof(unsigned long) the
   * return type of millis().
   *
   * NB: payload on client and server must be the same.
   */
   
  Mirf.payload = sizeof(uint8_t*);
  
  /*
   * Write channel and payload config then power up reciver.
   */
   
  Mirf.config();
  
  Serial.println("Listening..."); 
}

void loop(){
  /*
   * A buffer to store the data.
   */
   
  byte data[Mirf.payload];
  
  /*
   * If a packet has been recived.
   */
  if(Mirf.dataReady()){
    
    do{
      Serial.println("Got packet");

   
      /*
       * Get load the packet into the buffer.
       */
     
      Mirf.getData(&sent);

      /*
       * Set the send address.
       */
     
     
      Mirf.setTADDR((byte *)"clie1");
    
      /*
       * Send the data back to the client.
       */
     
      Mirf.send(&sent);
  Serial.println((uint8_t) sent);
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */
     
      while(Mirf.isSending()){
        delay(100);
      }
      
      Serial.println("Reply sent.");
    }while(!Mirf.rxFifoEmpty());
  }
}

it definitelly doesn't work, giving some pretty funky results. when I turn the potentiometer, I get random punctuation marks, like #,*,",+, etc. only ever one of them. I suppose these must correspond, in some language, to the values of the potentiometer, at those given times. only if I don't move the pot, I get nothing out.

When sending the time, you can cast the unsigned long to a byte array.

On the receiver, you set the payload size to the size of an uint8_t pointer, not a uint8_t.

Rather than using the _t type variables, which are just typedefs of standard types, stick to standard types.

The reason you are having difficulties with the pot setting being sent/received is that you are sending a binary value (115, for example), receiving it as a binary value, and then printing it is as though it was a string. Use the DEC specifier as the second argument for the Serial.print() function, to print the value as a value.

all right! the relevant section of my code now:

      /*
       * Send the data back to the client.
       */
     
      Mirf.send(&sent);
  Serial.println(sent, DEC);
      /*
       * Wait untill sending has finished
       *
       * NB: isSending returns the chip to receving after returning true.
       */

now, turning the potentiometer causes the output to change, and this output is numbers in the right range, that generally speaking increase and decrease as they should.

however, they do not reach the limits of the range, and sometimes they jump around. I still have issues. investigating your note about standard data types. thank's!

some notes for myself and/or others: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286190844/6 http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1237216994

this appears particularly useful: C data types - Wikipedia

it also is rather confusing. my machine runs on amd turion 64. apparently if I want to define an int in this context, I need 32 bits?

an 8 bite quantity, int8_t, for example qualifies as a char. hmm.

anyway, as for the comment that I should stick with standard types, leaving out the _t, I really have no choice, it seems to me, to understand them, because the mirf.cpp program is filled with them. unless I re-begin my devellopment process with another different example. easier to learn the uint8_t's :slight_smile:

perhaps you remain of your opinion? hmm..

-mike :slight_smile: