Arduino is an open-source electronics platform based on easy-to-use software and hardware development. When it comes to Arduino, some people may have heard of Arduino microcontrollers or Arduino circuit boards, as well as the Arduino IDE that can be used to program these boards. Arduino boards can read external signals, such as detecting light sources through sensors or inputting information through buttons, and convert them into outputs, such as activating LED lights or connecting to the cloud. The Arduino IDE is software that allows control and programming of the Arduino board simply by connecting it to a computer.
Arduino was designed by the Ivrea Interaction Design Institute in Italy. The original intention of its design was to allow students without a background in programming or electronic circuits to complete product development through the concept of rapid prototyping. However, as Arduino has grown, its audience has gradually expanded, and now, from students to hobbyists and even professionals, many people are using Arduino.
Although there are many different microcontroller systems on the market, Arduino has many advantages compared to many other systems for entry-level users, such as:
– Affordable, with many Arduino boards costing no more than $50
– Cross-platform, the Arduino IDE supports use on Windows, MacOS, and Linux, while many other platforms only support Windows
– User-friendly, the Arduino IDE is very simple to use and friendly for beginners.
As a simple demonstration, we can build a basic Arduino circuit using the Tinkercad simulation software.
This circuit connects the Arduino to a potentiometer as shown below.
The potentiometer can change its resistance by turning the knob on top, thus allowing us to change the voltage it consumes by adjusting its resistance.
The working principle of this circuit is to connect the A and C terminals of the potentiometer to a 5V voltage and the ground pin, while the output voltage B terminal is connected to the A0 interface of the Arduino board.
At this point, we can enter the following code in the Arduino IDE:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
float sensorValue = analogRead(A0);
// convert ADC value to voltage
float Vin = 5 * sensorValue / 1023;
// print out the value you read:
Serial.println(Vin);
delay(1); // delay in between reads for stability
}
Analyzing line by line, this code has the following functions:
Serial.begin(9600);
Indicates that the board starts serial communication at 9600 bits per second with the computer.
float sensorValue = analogRead(A0);
Indicates that the Arduino board reads the signal from the A0 interface and stores it in a floating-point number named sensorValue.
float Vin = 5 * sensorValue / 1023;
Since the voltage data read by the Arduino board has been stored as a number between 0 and 1023 by an analog-to-digital converter, we need to perform a mathematical operation to convert it back to voltage.
Serial.println(Vin);
Indicates that Arduino prints the read voltage value in the serial monitor.
By adjusting the resistance of the potentiometer, we can see that its output voltage is changing.
At this point, we can detect the voltage output from a potentiometer using Arduino and have a very basic understanding of the functionality and working principle of the Arduino board. If you are interested, we will further explain the uses and functions of Arduino in the future.
—————-END——————-
More Exciting Content
* Mass production in Q4 this year! Yushu releases the H1 general humanoid robot equipped with high-torque, high-explosive M107 joint motors
* Tesla’s “Optimus Prime” can do everything from watering flowers to yoga, motion capture makes robots more human-like
* Awarded SNSF support, the crocodile bionic robot Krock 2nd generation has made new research progress
* Yushu has released a new product that is 3.6 times faster than Boston Dynamics, with a speed of 6 meters per second, the world’s fastest quadruped robot B2 is here
* Latest research from Science Robotics: Flexible spine significantly enhances the mobility of mouse robots!
* What did well-known companies like Xiaomi, Midea, Estun, and Jingpin Special Equipment discuss? Review of the viewpoints from the 4th China Robotics Industry Annual Conference
* 18 major awards and 3 major lists announced! The 2023 Leaderobot China Robotics Industry Awards presented!
* What majors in the robotics field have good prospects?
* Ark Infinite X5, a key node connecting AI and the real robot world
* The first domestic high-dynamic humanoid robot has been mass-produced and delivered! The era of domestic production is approaching
* Has a robot that can autonomously build houses appeared?
* Domestic AGV leader, the first major customer BYD, Machine Science Co., Ltd. listed on the Beijing Stock Exchange with a surge of 256.25%
* Heavyweight! The Beihang University team has made new progress in perception and environmental interaction of soft continuum robots in Science Robotics
* Patent numbers increased 25 times in 8 years, from catching up to leading, the Chinese humanoid robot enters a “golden period” of development
* “53.45% compound annual growth rate?” Let’s hear some views from abroad on new policies regarding Chinese humanoid robots
* The spark of Chinese humanoid robots is spreading, looking forward to the year of full-scale mass production
* Blood and soul forged into the military spirit, scientific research for national needs! Congratulations to Professor Tang Peifu of the General Hospital of the People’s Liberation Army for being elected as a member of the Chinese Academy of Engineering!
* Contributing outstandingly in the field of high-end equipment, congratulations to Professor Chen Xuedong of Huazhong University of Science and Technology for being elected as a member of the Chinese Academy of Engineering!
* Congratulations to Professor Yu Haibin, a well-known expert in Chinese robotics, for being elected as an academician! Promoting industrial development with innovative scientific and technological achievements
* Robot remote control system: a multiplier of human strength
Join the Community
Welcome to join the “Robot Lecture Hall” reader discussion group, to discuss topics related to robotics and share cutting-edge technology and industry dynamics.
Discussion groups on educational robots, medical robots, legged robots, industrial robots, service robots, special robots, drones, soft robots, etc. are recruiting. Follow the Robot Lecture Hall public account, send ” Group Chat ” to get the way to join!
Recruiting Authors
The Robot Lecture Hall is recruiting 【part-time content creators】. If you are interested in writing articles on robotics 【technology】 or 【industry】 topics, please send your resume and original works to: [email protected]
We have no requirements for profession, location, etc., and welcome friends to join!
Feeling tired? Click “Read” to support us!
Leave a Comment
Your email address will not be published. Required fields are marked *