Comments (3)
Hi!
You are welcome :). It is good to hear this project is being useful out there.
This library can send any string over to the Arduino, just as the one you mentioned.
The problem you describe sounds like you are using the Serial.read()
function in your Arduino code, which only reads the first byte sent (if you call it a second time you would get the second character sent).
If you want to read a full string, check the function Serial.readString(), that will read the whole string sent. Then you can use the function toCharArray()
to copy it to a normal C-like string and break it by commas using strtok()
.
from ardity.
Thank you! I appreciate the assistance!
from ardity.
You are welcome!
Please note I modified a bit my answer, do not use c_str()
with strtok()
because strtok
modifies the first argument (i.e. the string returned by c_str
), which is something the Arduino docs tell us not to do.
Better use toCharArray()
that copies the string to a different char array that you can modify with strtok
as you want.
from ardity.
Related Issues (20)
- Queue is full problem (interfering arduino with unity) HOT 1
- I/O operation aborted HOT 3
- How can I send numbers and variables to my arduino? HOT 1
- usb serial on android receives data from Arduino but won't connect to unity HOT 4
- Prefab script missing for SerialController_BinaryDelimited HOT 1
- serialPort.DtrEnablerequired for Circuit Python on Circuit Playground HOT 1
- SendSerialMessage is slow HOT 2
- queue is full dropping messege HOT 8
- Works In Editor but now on windows build HOT 3
- From Unity to Arduino HOT 2
- Working with BLE and Mobile HOT 3
- Can ardity read serial information from arduino attached to an android device via usb c (unity android build)? or is it only for windows?
- The Data is visible in Arduino serial monitor but not reciving in Unity3D HOT 1
- Can't compare strings (sorry am noob) HOT 1
- Game crashes when exiting HOT 2
- cant find the COM HOT 2
- PortMapper trial HOT 2
- Does Ardity work on Linux ? HOT 1
- Dropping too much messages when frame rate is below 100 fps HOT 3
- Flooding queue when device is removed unexpectedly on linux HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ardity.