Go Down

Topic: Udp.sendPacket whit analog_input (Read 946 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy