当前位置:网站首页>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="";
}
}
边栏推荐
- P2788 math 1 - addition and subtraction
- String formatting
- MySQL insert data create trigger fill UUID field value
- Multithreaded asynchronous orchestration
- China Southern Airlines pa3.1
- 如何顺利通过下半年的高级系统架构设计师?
- 2022.7.5DAY597
- 【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
- When do you usually get grades in the soft exam? Online pedaling?
- How much review time does it usually take to take the intermediate soft exam?
猜你喜欢
Find the root of equation ax^2+bx+c=0 (C language)
想考中级软考,一般需要多少复习时间?
[OneNote] can't connect to the network and can't sync the problem
leetcode-304:二维区域和检索 - 矩阵不可变
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
软考中级有用吗??
多线程-异步编排
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
CSAPP Bomb Lab 解析
Trajectory planning for multi-robot systems: Methods and applications 综述阅读笔记
随机推荐
BUUCTF---Reverse---reverse1
多线程-异步编排
TypeScript 接口继承
Schnuka: working principle of robot visual grasping machine visual grasping
关于easyflash v3.3使用过程的记录
施努卡:机器视觉定位技术 机器视觉定位原理
Hdu-2196 tree DP learning notes
CC2530 zigbee IAR8.10.1环境搭建
P2788 math 1 - addition and subtraction
【推荐系统 01】Rechub
那些易混淆的概念(三):function和class
The mobile terminal automatically adjusts the page content and font size by setting rem
Those confusing concepts (3): function and class
Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!
[牛客网刷题 Day6] JZ27 二叉树的镜像
深入理解Apache Hudi异步索引机制
IIC Basics
Is the soft test intermediate useful??
IDA中常见快捷键
中级软件评测师考什么