Recent Posts

Pages: [1] 2 3 ... 10
Displays / Re: Writing to serial LCD seem...
Last post by element222 - Today at 08:04 am
Thanks, I didn't know it was a known problem. I'll Google it.
Newcomers are sometimes unsure how to receive data into an Arduino sketch from the Serial Monitor or from a program running on a PC. I thought it would be helpful to write a demo sketch that illustrates a few useful techniques.

The sketch attached to this Post includes 5 self contained functions that illustrate different ways to deal with incoming data.

  readSingleChar()      reads and saves a single character and its byte value
  readSingleDigit();    reads and saves as a number any of the digits 0-9
  readSeveralChars();   reads several characters and saves them as a string in a character array
  readOneFloat();       reads several numeric characters and saves them as a floating point value
  readCSV();            reads a string, an integer and a float separated by commas
                          for example testing , 123 , 456.78
Newcomers should not be put off by the length of the total sketch. They should just concentrate on one function at a time. The comments will make more sense if the functions are studied in order.

To try (for example) the readSingleDigit() function it is only necessary to comment out all the other functions in loop() as follows
Code: [Select]
//  readSingleChar();
//  readSeveralChars();
//  readOneFloat();
//  readCSV();

One thing that these simple examples do NOT have is the ability to identify the correct start and end to a message - it is possible for part of a message to be missed. This is unlikely in this demo because of the 1 second delay between iterations of loop() but it is a real risk in a working program that runs quickly. The demo sketch that I included in the first post of this Thread shows how to deal with this problem. Its technique can be combined with the techniques here.

Hello Robin,
After searching for some relevant threads, I though to ask here as it seems to be relevant to the problem at hand!

Problem statement: I want to read a csv file sent from python and do the operation on the Arduino like blinking LED / LED cube!

So , can we use readCSV function for IRIS dataset as it has integers, floats and species strings in the data..
The only thing I see is the string is printed at last coloum in the csv file...if we change the string colum to first to get a handshake for your function, then I thing this function can be called?Right?
Hi all,

i just have a question regarding the mesh.write function in the TMRh20 RF24Mesh library.

In the class documentation, for the mesh.write funtion, can someone explain the msg_type variable?

The documentation says that....

"Message types 1-64 (decimal) will NOT be acknowledged by the network, types 65-127 will be. Use as appropriate to manage traffic: if expecting a response, no ack is needed."

Can someone please explain to me what the decimal numbers 65-127 actually represent and how you select what mesg_type value to use??

I have also seen the mesg_type value of "M" used, like in the example on this page.

Thanks heaps ^_^
Arduino Due / NRF24L01 with 32 bit Data with...
Last post by EJLED - Today at 07:58 am
Hi, all member.

I am interfacing NRF24L01 wireless radio link  with DUE board using SPI protocol.

I am trying to transfer the 32 bit data using SPI to NRF24L01 at transmitter side and same at receiver side.

I have attached the test code, it is working ok. but the issue with this code is its too slower. it takes almost 20 seconds to transfer data from transmitter and receiver.

kindly correct me what is going wrong in the code. is there any way to send all this within 2 seconds?

And here's the device status.

Currently, this hardware device is not connected to the computer. (Code 45)

To fix this problem, reconnect this hardware device to the computer.

When I do reconnect it the driver reappears momentarily and then grays out.
as if it were ejected.
Project Guidance / Re: button arrays and counters
Last post by SeeTheWinter - Today at 07:50 am
Error Message I get:

Code: [Select]
Arduino: 1.8.5 (Windows 10), Board: "Arduino Nano, ATmega328P"

In file included from C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_animations.h:30:0,

                 from C:\Users\Lettie\Documents\Arduino\Project_A\Project_A.ino:60:

C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:29:27: error: variable or field 'tlc_setGSfromProgmem' declared void

 void tlc_setGSfromProgmem(prog_uint8_t *gsArray);


C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:29:27: error: 'prog_uint8_t' was not declared in this scope

C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:29:41: error: 'gsArray' was not declared in this scope

 void tlc_setGSfromProgmem(prog_uint8_t *gsArray);


C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:65:27: error: variable or field 'tlc_setGSfromProgmem' declared void

 void tlc_setGSfromProgmem(prog_uint8_t *gsArray)


C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:65:27: error: 'prog_uint8_t' was not declared in this scope

C:\Users\Lettie\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:65:41: error: 'gsArray' was not declared in this scope

 void tlc_setGSfromProgmem(prog_uint8_t *gsArray)


exit status 1
Error compiling for board Arduino Nano.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
what you mean with FTDI
A USB-to-ttl cable; it's often referred to as FTDI because one of the chips that can be used for it is manufactured by FTDI.

They might be cheaper than a new board if you shop around; I could unfortunately not find something cheap immediately as I don't shop often and never bought one like that. Not cheap but to give you the idea: Be aware that there are 5V and 3.3.V versions.

You can also opt for a Nano clone; lot cheaper than an Uno if you shop.

We have discussed the fact that the USB communication does not work due to a board problem. There might be more wrong with your board; e.g. main micro damaged. So be careful how you spend your money if you don't have much.
I just tried uploading on another computer and as soon as I press upload the driver becomes "hidden" and it errors.

The ports menu seems to be grey because the software cant detect the driver when it is "hidden" and the menu is grayed out because I don't have any other ports on my laptop.

P.S screenshot taken when I tried to upload on my desktop original error occurred on a laptop.
Project Guidance / Re: servo and mosfet
Last post by Trickyrick - Today at 07:43 am
Thanks for your help Leo.
Project Guidance / Re: button arrays and counters
Last post by SeeTheWinter - Today at 07:32 am
Hi, I finally got the chance to test the code. Sadly it doesn't work. The Arduino is reading the button presses, because the onboard lights react when the buttons are pressed. If I hold a button and let go, some of the LEDs light up for a few seconds then turn off. It always seems to be random, because some do light up and some don't. I tested all the LEDs individually, and all are working. I even checked all the rest of the wiring, and it is all correct.
My first thought was to check and reinstall the library you pointed out earlier. But there now seems to be a problem with the library, because it won't compile anymore. I'll post the error message soon as I get home.
But I tried another library from Alex Leone and had the exact same problems.
I'm hoping to get help fixing the library problem
Pages: [1] 2 3 ... 10