当前位置:网站首页>Arduino receives and sends strings
Arduino receives and sends strings
2022-07-07 10:49:00 【HCC2017】
void setup(){
Serial.begin(9600);
}
String bytes ="";
void loop() {
while (Serial.available() > 0)
{
bytes += char(Serial.read());
delay(2);
}
int index=bytes.toInt();
if(index>0&&index<1000)
{
Serial.println(index);
index=0;
bytes="";
}
}
边栏推荐
- Typescript interface inheritance
- Mendeley -- a free document management tool that automatically inserts references into papers
- 原型与原型链
- What is an intermediate network engineer? What is the main test and what is the use?
- 简单易修改的弹框组件
- 2022年上半年5月网络工程师试题及答案
- 对word2vec的一些浅层理解
- [homework] 2022.7.6 write your own cal function
- 【机器学习 03】拉格朗日乘子法
- [detailed explanation of Huawei machine test] tall and short people queue up
猜你喜欢
软考信息处理技术员有哪些备考资料与方法?
【推荐系统 01】Rechub
Cluster task scheduling system lsf/sge/slurm/pbs based on HPC scenario
ADB utility commands (network package, log, tuning related)
Applet jump to H5, configure business domain name experience tutorial
Monai version has been updated to 0.9. See what new functions it has
【推薦系統 01】Rechub
How to prepare for the advanced soft test (network planning designer)?
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
2022年上半年5月网络工程师试题及答案
随机推荐
【推薦系統 01】Rechub
ADB utility commands (network package, log, tuning related)
Leetcode-304: two dimensional area and retrieval - matrix immutable
BUUCTF---Reverse---reverse1
JS implementation chain call
Summary of router development knowledge
Is the soft test intermediate useful??
Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
[machine learning 03] Lagrange multiplier method
2022.7.6DAY598
多线程-异步编排
【推荐系统 01】Rechub
[système recommandé 01] rechub
Deep understanding of Apache Hudi asynchronous indexing mechanism
【实战】霸榜各大医学分割挑战赛的Transformer架构--nnFormer
Find the greatest common divisor and the least common multiple (C language)
SQL Server 知识汇集9 : 修改数据
What does intermediate software evaluator test
CSAPP bomb lab parsing
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr