当前位置:网站首页>Day 1 of the 10 day smart lock project (understand the SCM stm32f401ret6 and C language foundation)
Day 1 of the 10 day smart lock project (understand the SCM stm32f401ret6 and C language foundation)
2022-06-13 01:50:00 【It's Beichen bupiacra】
10 Day Smart Lock Project Practice No 1 God ( Understand SCM STM32F401RET6 and C Language foundation )
One 、 Learning goals
Two 、 Understand SCM STM32F401RET6






4、STM32F401RE features 


3、 ... and 、C Language foundation
1. data type
Commonly used 2 To the power of :
2^7 = 128
2^8 = 256
2^15 = 32768
2^16= 65536
51 Common data types of single chip microcomputer :
char: Occupy memory 1 byte Value range :-128~127 -2^7 ~ 2^7-1
unsigned char: 0~255
int: Occupy memory 4 byte Value range :-32768~32767
unsigned int: 0~65535
long int : Occupy memory 4 byte Value range :-2147483648~2147483647
unsigned long int:0~4294967295
Add :1 byte (byte) = 8 position (bit) Every representative 0/1
2. Hexadecimal conversion
① Convert decimal to binary
Eg:83
② 16 Binary to binary
Eg:0XFF
16 Base number : 0 1 2 3 4 5 6 7 8 9 A B C D E Ff:1 2 4 8
3. Variable
Before using variables, users need to define variables
Defining variables :
Int a; //a yes int Variable of type
char b;//b yes char Type variables
float c;//c yes float Type variables
Special prefix :
extern int a;// Statement int Variable of type a, Can be used across files , commonly .h It is defined
const int b=1;// Define an immutable variable , Use const Keyword should be given an initial value
static int c=1;// Static variables , Initialize only when first used , Equivalent to a global variable
4. Basic statement
Conditional statements :
If(a>0)
{
perform ;
}
Else、else if
remind :
If When judging the results of the following conditional statements , Non zero is true , Zero is false
Else There is no need to add a condition later
switch(ch)
{
case ‘a’: perform ; break;
case ‘b’: perform ; break;
}
Loop statement :
for
Format :
for(i=0;i<n;i++)
{
}
While
Format :
while(1)
{
;
}
do while;// It is applicable to the cycle without knowing the number of cycles
Control statement :
break;// Jump out of conditional statements and loop statements directly
coutinue;
goto
边栏推荐
- Unity jsonutility failed to serialize list
- 路径字段是什么? ——竞价广告
- Startup, connection and stop of MySQL service
- The first cell of devaxpress CXGRID after inserting a row is in focus editing status
- JSON and protobuf Any interchange
- 关于tkinter.Canvas 不显示图片的问题
- Combining strings and numbers using ssstream
- Magics 23.0如何激活和使用视图工具页的切片预览功能
- Tweens of phaser3
- [wsl2]wsl2 migrate virtual disk file ext4 vhdx
猜你喜欢

Devaxpress Chinese description --tdximageslider (picture rotation control)

3、 Upload fabric photos to SQL server and provide name to display fabric photos

Jeux de plombiers

Establishment of microservice development environment
![[andoid][step pit]cts 11_ Testbootclasspathandsystemserverclasspath at the beginning of R3_ Analysis of nonduplicateclasses fail](/img/b5/7ea603775dc0448368d209de037a43.png)
[andoid][step pit]cts 11_ Testbootclasspathandsystemserverclasspath at the beginning of R3_ Analysis of nonduplicateclasses fail

Implementation of pointer linked list

Magics 23.0 how to activate and use the slice preview function of the view tool page

【MathType】利用MathType输出LaTex样式的公式

LabVIEW大型项目开发提高质量的工具

URI, URL and urn difference, relation and syntax diagram
随机推荐
Decompression and compression of chrome resource file Pak
Combining strings and numbers using ssstream
深度学习调参技巧详解
ng-tv-focusable
Cmake has no obvious error after compilation, but prompts that pthread cannot be found
Anims of phaser3
[soft test] software designer knowledge points sorting (to be updated)
什么是立体角
Compiling minicom-2.7.1 under msys2
Use of Arduino series pressure sensors and detected data displayed by OLED (detailed tutorial)
Detailed explanation of audience characteristics
[Andoid][踩坑]CTS 11_r3开始出现的testBootClassPathAndSystemServerClasspath_nonDuplicateClasses FAIL问题分析
cin,cin. get(),cin. Summary of the use of getline() and getline()
他山之石:a16z 的 Web3 投资版图
[WSL2]WSL2迁移虚拟磁盘文件ext4.vhdx
What is the path field—— Competitive advertising
About retrieving ignored files in cornerstone
6、 Implementation of warehouse out management function
Unity JsonUtility 无法序列化List
Server installation jupyterab and remote login configuration

