[Diao Ye learns programming] Arduino hands-on (197) --- zero knowledge STM32F103RBT6 standard development board 2

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensor and actuator modules on hand, in accordance with the concept of true knowledge (must be hands-on), for the purpose of learning and communication, here I am going to try and do more experiments one by one. Whether it is successful or not, it will be recorded ——Small progress or unsolvable problems, I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 197: Zero-knowledge development board STM32F103RBT6 main chip standard board replaces arduino uno

insert image description here
insert image description here
Zero Knowledge Laboratory is a non-profit laboratory for researching cutting-edge electronic application technology, and focuses on open source and promotion of electronic technology, so that people can learn electronic technology more easily and happily. It has a complete and powerful team, including embedded hardware, embedded software, Technical engineers and senior project leaders in the front and back of the website.

Zero Knowledge Lab is committed to building an open source platform for China's local software and hardware. Through this open platform, whether it is electronics enthusiasts, makers and smart hardware developers with professional knowledge background, or children and amateurs without professional knowledge background , can easily complete the rapid realization from idea to prototype. At the same time, we focus on the application of wireless technologies such as WIFI, BLE, ZigBee and other common sensors in the Internet of Things, such as temperature and humidity, attitude, image, color, sound and other modules. With our help, your smart hardware products will be able to obtain various sensor data Easier, easier to connect to the network.

Lingzhi Lab official website http://www.lingzhilab.com/

insert image description here

The Zero Knowledge standard board developed by Zero Knowledge Lab has been officially released. The Zero Knowledge standard board adopts the same frame design as the Arduino UNO, so the size is exactly the same as it, and the pin interface is also fully compatible with the UNO. The Zero Knowledge standard board uses STM32F103RBT6 as the MCU, adopts a 32-bit high-performance ARM core, and makes its operating frequency up to 72MHz; has a large storage space-20KB RAM, 128KB FLASH; includes 37 IO pins, 15-way PWM, 15-way ADC (12-bit precision), a USB device interface, and a USB-to-serial device interface; USB, AC-DC adapter, LI-PO and other ways of power supply can be used; at the same time, the Zero-Knowledge standard board and the Zero-Knowledge development tool can realize a Key download, very convenient to use.

insert image description here

insert image description here

Click OK, and then you can see the following interface, and the example is also displayed normally, indicating that the installation is normal:

insert image description here

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 195: Zero-knowledge development board STM32F103RBT6 main chip standard board replaces
one of the arduino uno projects: simple serial port output and onboard LED lights flashing

Experimental open source code

/*
【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验一百九十五:零知开发板 STM32F103RBT6 主芯片 标准板 替代arduino uno
项目之一:简单串口输出和板载LED灯闪烁
*/

// 复位或上电后运行一次:
void setup()
{
    
    
  //在这里加入初始化相关代码,只运行一次:

  //板载LED灯 - LED_BUILTIN 引脚,设置为输出模式
  pinMode(LED_BUILTIN, OUTPUT);

  //开启串口,设置波特率9600
  Serial.begin(9600);
}

//一直循环执行:
void loop()
{
    
    
  // 在这里加入主要程序代码,重复执行:

  //串口打印信息,在串口调试窗口观察该打印信息
  Serial.println("零知开源,让电子制作变得更简单!");

  //让LED引脚输出高电平
  digitalWrite(LED_BUILTIN, HIGH);

  //延时一会儿,便于肉眼能观察
  delay(500);

  //LED引脚输出低电平
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

main programming interface

insert image description here

Experimental serial port output

insert image description here

Experimental scene graph

insert image description here

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 195: Zero-knowledge development board STM32F103RBT6 main chip standard board replaces arduino uno
Project 2: Detect button input to control LED lights on and off

Experimental open source code

/*
【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验一百九十五:零知开发板 STM32F103RBT6 主芯片 标准板 替代arduino uno
项目之二:检测按键输入,来控制LED灯的亮和灭
*/

#define KEY 0 //连接按键引脚编号 

// 复位或上电后运行一次:
void setup()
{
    
    
        //在这里加入初始化相关代码,只运行一次:
        //开启串口,设置波特率9600
        Serial.begin(9600);
       Serial.println("准备就绪");
        //按键引脚设置为输入模式
        pinMode(KEY, INPUT);
        pinMode(LED_BUILTIN, OUTPUT);
}

//一直循环执行:
void loop()
{
    
    
        // 在这里加入主要程序代码,重复执行:
        digitalWrite(LED_BUILTIN, HIGH);

        if (digitalRead(KEY) == LOW)
        {
    
    
                //消除抖动的影响
                delay(10);
                if (digitalRead(KEY) == LOW)
                {
    
    
                        Serial.println("按键按下了");
                        digitalWrite(LED_BUILTIN, LOW);

                        //等待按键释放
                        while (digitalRead(KEY) == LOW)
                        {
    
    
                                delay(10);
                        }
                }
        }
}

Experimental serial port output

insert image description here

Experimental scene graph

insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132153143