Cov txheej txheem:

Python3 thiab Arduino Kev Sib Txuas Lus: 5 Cov Kauj Ruam
Python3 thiab Arduino Kev Sib Txuas Lus: 5 Cov Kauj Ruam

Video: Python3 thiab Arduino Kev Sib Txuas Lus: 5 Cov Kauj Ruam

Video: Python3 thiab Arduino Kev Sib Txuas Lus: 5 Cov Kauj Ruam
Video: Converting Python 2 Scripts to Python 3! 2024, Lub Xya hli ntuj
Anonim
Python3 thiab Arduino Kev Sib Txuas Lus
Python3 thiab Arduino Kev Sib Txuas Lus

Nqe lus piav qhia

Hauv qhov haujlwm no peb yuav xa cov lus txib los ntawm Python3 mus rau Arduino pawg thawj coj, uas yuav ua kom yooj yim nkag siab thaum sib tham ntawm Python3 thiab Arduino. Peb yuav ua "Nyob zoo ntiaj teb" ntawm Arduino platform uas txhais tau tias tig ON/OFF built-in LED ntawm Arduino Uno.

Yog li ua ntej tshaj plaws cia kuv qhia koj …

Vim li cas kuv thiaj ua qhov haujlwm no?

Ua ntej tshaj plaws, muaj ntau qhov kev qhia tso rau hauv internet tshwj xeeb hauv youtube txog cov ncauj lus no tab sis lawv tau siv Python2 version, thiab qhov thib ob, Kuv tau teeb tsa qhov tseeb uas yog Python3.7.2. Muaj qhov sib txawv me ntsis ntawm Python2 thiab Python3 thaum koj siv nws los txuas nrog Arduino. Yog li tom qab kuv daws qhov teeb meem ntawm kev xa cov lus txib los ntawm Python3 mus rau Arduino, Kuv xav tias qhov no yuav tsum tau qhia rau cov tsim khoom thiab tag nrho cov zej zog nyiam ua haujlwm.

Cia peb pib

Cheebtsam koj xav tau:

  1. Arduino UNO pawg thawj coj saib
  2. USB cable

Qhov ntawd yog txhua yam koj xav tau ntawm kev kho vajtse:)

Kauj Ruam 1: Txheej Txheem Txhim Kho

Yuav ua li cas rau nruab Python3 version thiab PySerial pob

Tam sim no koj tuaj yeem tshawb hauv YouTube txog cov khoom teeb tsa. Saum toj no yog vis dis aus rau txhim kho Python3 version thiab PySerial pob.

Kauj ruam 2: Coding hauv Arduino

Image
Image

Ntu 1: Coding hauv arduino

Kauj Ruam 3: Coding hauv Python3

Part2: coding hauv nab hab sej 3

Kauj Ruam 4: Cov Cai Code ntawm Arduino thiab Python3

Nco tseg

Nco ntsoov tias ua ntej koj rub daim duab Arduino thiab tom qab ntawd Python code.:) Qhia rau kuv paub ntawm ntu lus saib yog tias koj muaj teeb meem thaum ua qhov haujlwm no.

Pom zoo: