Pages: [1]   Go Down
Author Topic: Udp.sendPacket whit analog_input  (Read 879 times)
0 Members and 1 Guest are viewing this topic.
Sud-Ouest
Offline Offline
Full Member
***
Karma: 0
Posts: 117
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cry
How?
Code:
Udp.sendPacket( analogRead(9), remoteIp, remotePort);
Thank you in advance if anyone can help me!
« Last Edit: November 25, 2011, 08:35:19 am by cutprod » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49384
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I was not able to convert my variable of type int to char
Look at atoi() or sprintf().
Logged

Sud-Ouest
Offline Offline
Full Member
***
Karma: 0
Posts: 117
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you very much I will test !
Logged

Pages: [1]   Go Up
Jump to: