当前位置:网站首页>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="";
}
}
边栏推荐
- 施努卡:机器人视觉抓取工作原理 机器视觉抓取
- Gym installation pit records
- 中级网络工程师是什么?主要是考什么,有什么用?
- Multisim -- software related skills
- 软考中级,软件设计师考试那些内容,考试大纲什么的?
- 【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
- 2022.7.3DAY595
- 在线硬核工具
- Five simple and practical daily development functions of chrome are explained in detail. Unlock quickly to improve your efficiency!
- Some online academic report websites and machine learning videos
猜你喜欢

【亲测可行】error while loading shared libraries的解决方案

Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry

2022年上半年5月网络工程师试题及答案
![[OneNote] can't connect to the network and can't sync the problem](/img/28/9a02b1da0f43889989a9539c9fb6b6.png)
[OneNote] can't connect to the network and can't sync the problem

软考中级有用吗??

Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master

软考信息处理技术员有哪些备考资料与方法?

【推薦系統 01】Rechub

leetcode-304:二维区域和检索 - 矩阵不可变

The difference between monotonicity constraint and anti monotonicity constraint
随机推荐
枪出惊龙,众“锁”周之
[installation system] U disk installation system tutorial, using UltraISO to make U disk startup disk
The gun startles the dragon, and the crowd "locks" Zhou Zhi
ThreadLocal is not enough
使用U2-Net深层网络实现——证件照生成程序
TypeScript 接口继承
如何顺利通过下半年的高级系统架构设计师?
高级软考(网络规划设计师)该如何备考?
[detailed explanation of Huawei machine test] tall and short people queue up
Records on the use of easyflash v3.3
單調性約束與反單調性約束的區別 monotonicity and anti-monotonicity constraint
Long list performance optimization scheme memo
2022年7月10日“五心公益”活动通知+报名入口(二维码)
软考信息处理技术员有哪些备考资料与方法?
2022.7.6DAY598
【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
优雅的 Controller 层代码
Those confusing concepts (3): function and class
打算参加安全方面工作,信息安全工程师怎么样,软考考试需要怎么准备?
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master