LoPy to LoPy analog
-
hi, im trying to send the analog value i detected on LoPy A to LoPy B. i have try using the coding to send 'Ping' and 'Pong' but it does not show the analog value. is there anyone can help? thanks
-
@vicky_
First help us help you.
Show some portion of code and we then can help you. -
@livius hi. sorry. this is my coding for both lopy

-
@vicky_
i do not understand this lineprint('ADC value: ''value %f')as you can see you got by this result aimplw string
ADC value: value %fWhy do not you do the same as before in above line with print?
print("ADC value:" + str(value)) -
@livius print? i did not print('ADC value: ' 'value %f') instead i s.send('ADC value:' 'value %f') if print it will only display on the console. what i want to do is send the recorded analog value to another Lopy. i think must be something wrong with 'value %f' but i dont know what should be replace.
-
@vicky_
Yes, i mean send as printwhat do you mean you got from this?
'ADC value: ' 'value %f'where do you put real value if you have 2 strings? Look at apostrofs ;-)
look at your left panel (which is ok) and how you do send, only 2 apostrofs not 4 as on right panel ;-)
-
@livius thanks for your fast response! :D :D
i actually dont know how to put the real value. left lopy is function as receiver, and right lopy is function as sender. left wanted to send 'Ping' as a string to communicate with left and after left received the string it wont display it, instead it will send out the 'ADC value:' as string and ___ real value which i dont know what should i put to the left and left will print out .Hopefully my explanation did not confuse you. i really have no idea what to do :(
-
@vicky_
simple write thiss.send("ADC value:" + str(value)) -
@livius OMG! it works! i tried s.send('ADC value:' + str(value)) but i never try s.send("ADC value:" + str(value)) thank you so much!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login