In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the method of TurnipBit developing rotating buttons to control the speed of DC motor". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Experimental purpose:
Learn the method of extending the simple Icano interface in the PC system
Learn TurnipBit splicing programming
Understand the working principle of DC motor
Learn how L298N works
Learn the connection mode of TurnipBit expansion board L298N and key module
two。 Required original devices:
TurnipBit together
TurnioBit expansion board
Some DuPont lines
One usb cable
Press a key module
A DC motor
L298N motor drive module
3. Experimental principle:
L298N is a kind of high voltage and high current motor driver chip. The chip is packaged with 15 pins. The main features are: high working voltage, the highest working voltage can reach 46v, output current is large, instantaneous peak current can reach 3A, continuous working current is 2A, rated power is 25w. The high-voltage and high-current full-bridge driver with two H-bridges can be used to drive DC motors and stepper motors, relay coils and other inductive loads. The standard logic level signal control is adopted, and there are two enabling control terminals, which allows or forbids the device to work with a logic power input without being affected by the input signal, so that the internal logic circuit part works at low voltage, the external detection resistance can be connected, and the change is fed back to the control circuit. The L298N chip is used to drive the motor, which can drive a two-phase stepper motor or a four-phase stepper motor, or two DC motors.
4. Connection method:
The interface between the TurnipBit expansion board and the LED is shown in the following table: SFDA DDSEA
5. Source code:
Writing code through TurnipBit visual programming
Visual programming:
Source code:
From microbit import * speed_list = [423,623 1023] pin0.write_analog (1023) numbrt = 0while True: display.show (Image.YES) if pin5.read_digital (): numbrt = numbrt + 1 if numbrt > 3: numbrt = 1 pin0.write_analog ((speed_ list [numbrt-1])) flag = str (numbrt) + str (') display.show (flag) sleep (5000) "TurnipBit develops rotating buttons to control the speed of DC motors That's all for the content of "what is Dharma?" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.