Go Down

Topic: Udp.sendPacket whit analog_input (Read 903 times) previous topic - next topic

cutprod

Nov 25, 2011, 02:33 pm Last Edit: Nov 25, 2011, 02:35 pm by cutprod Reason: 1
Hello everyone and congratulations to the forum!
I started with the Arduino.
I will wish to use the "Udp.sendPacket" and "Udp.readPacket" to write and read the value of an analog input.
But I'm stuck! I was not able to convert my variable of type int to char  =(
How?
Code: [Select]
Udp.sendPacket( analogRead(9), remoteIp, remotePort);
Thank you in advance if anyone can help me!

PaulS

Quote
I was not able to convert my variable of type int to char

Look at atoi() or sprintf().

cutprod

thank you very much I will test !

Go Up