Comments (1)
Hi archiene,
It's been a couple of months, but I have a possible answer to your question, if I undrstood it correctly.
If you check the code, in the Loop() function, in the following lines:
memcpy(com_buffer, msg, 11); // size of variable msg. In this case, 11.
com_buffer[11] = i + '0' ; /
if(write(com_buffer, 12) < 0){
delay(10);
}else{
You can see that in memcpy, the size is 11. That's because the variable msg holds the value "Hello World", which contains 11 characters.
If you want to change the message, remember to change the size in this piece of code as well. For example, if you want to send "Hello" (5 characters), the code should be as follows:
memcpy(com_buffer, msg, 5);
com_buffer[5] = i + '0' ;
if(write(com_buffer, 6) < 0){
delay(10);
}else{
I hope this answer is useful somehow, and sorry about possible English errors.
from arduino.
Related Issues (20)
- Emitter and Receiver in one file as Transceiver? HOT 3
- License?
- How can I slow down the message transfer?
- Can these codes be uploaded onto an Arduino Nano?
- VLC on Android Phone HOT 2
- ARDUINO UNO, LED, PHOTODIODA HOT 2
- Multiple Transmitter
- Possibility of transmission in greater reach? HOT 1
- Circuit Diagram HOT 1
- Can i run the VLC code using Arduino Mega HOT 1
- Which type of Arduino nano I use to run the code
- Is it possible to increase the no of words in an sentence?
- arduino uno
- the number of characters received
- use led bulb
- code of program
- Contact
- Uu HOT 1
- which is the arduino used here??Nano or UNO HOT 3
- Connecting the components.
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 arduino.