problem when sending UDP signal from android to arduino
2 ビュー (過去 30 日間)
古いコメントを表示
Noor Zeid
2017 年 2 月 28 日
編集済み: Walter Roberson
2017 年 3 月 2 日
I made an app using Matlab and deployed it to my phone, I am trying to send UDP signal from the app to my Ethernet Arduino shield, the arduino model contains the UDP recive block for arduino and the app model contains the UDP send block for android! when I receive the signal it is not the same ! I am sending numbers but I receive a different numbers each time !
0 件のコメント
採用された回答
Subin Kuttappan Stellal Mary
2017 年 3 月 2 日
Arduino UDP Receive block outputs the data received from the UDP local port as uint8 (single byte) values. The range is from 0 to 255.
From Android UDP Send block, you can send data as uint8, int8, uint16, int16, uint32, int32, single, and double.
Check whether you are sending the data as uint8 values from Android. If it is not, then the received numbers might differ.
Eg: Send the number '4' as uint32 from Android. The number will be sent as 4 bytes. You will receive four bytes in Arduino, as 0, 0, 0 and 4.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!