Go Down

Topic: I DO NOT want ghetto data conversions because of telnet (Read 2189 times) previous topic - next topic


Feb 20, 2011, 11:28 pm Last Edit: Feb 20, 2011, 11:38 pm by delinquentme Reason: 1
Ha. i think the title sums it up.

What I'm after:
RoR App <=> MAGIC DATA TRANSFER*  <=> Arduino Ethernet shield

*magic data transfer has been achieved using telnet
... BUT with this AWFUL ascii converted data

I telnet in, and send it:
# stepper rotates

ABSOLUTELY NOT what im after...

i want to send it:
# stepper steps 100 steps
# stepper steps reverse 100 steps

1. CAN this be done with telnet?
2. MUST i resort to this fugly data conversion

if ( #2 == 'true'){
    Forget telnet ... what can i use to send real STRICT .. unconverted data types?

I simply cannot imagine that there is __NO__ way to send my data as an INTEGER .. and not have to do this wonky conversion / reconversion bc im using TELNET as a transfer method

... telnet is the simplest solution .. which id like to use .. but id REALLY REALLY like to send it actual integers


Telnet sends ascii data. You need to collect the characters in an char array, keeping it NULL terminated, and convert the ascii representation of the number ("100") to an integer. It happens that there is a function, atoi() to do exactly that.
The art of getting good answers lies in asking good questions.


ok so after some research TELNET is exactly NOT the way to do this

so im gonna make a new post with what im actually going to do

Go Up