前置作業
mbed 板子裡面其實有一個 .HTML 的檔案,當你點擊這個檔案後,會進入到 mbed 的登入畫面,若你有帳號的話,請在左邊輸入完資料後就可以登入到 mbed 的雲端編譯器,若沒有擇點選Sign up註冊,並將DISCO-L475VG-IOT01A設為你目前所使用的板子即可。
前置作業做完了,那這邊要來教各位第一個範例
1.LED交替閃爍
這邊的話,首先,在這個頁面點擊左方的My Programs右鍵創建新檔,點擊之後於第二欄Template選擇最下面的Empty Program即可創建。

在中間的框框右鍵New File即可(記得,檔案名後要.cpp)。
創建完後,先點擊左上角的Import,在左上角的搜尋,輸入mbed並點擊兩下第一個,即可安裝。
之後,我們回到前面的.cpp文件。
輸入以下程式碼:

注意:我們前面有#include,所以需要額外import程式庫,點選右上方的import,後在右邊的搜尋欄中輸入mbed,點擊框中黑框兩下即可安裝。

並點擊上方的Compile,待其跑完進度條,將新增的.bin檔案放入mbed板子即可。
2.A/D讀取 光敏電阻讀值
這邊的話,首先,在這個頁面點擊左方的My Programs右鍵創建新檔,點擊之後於第二欄Template選擇最下面的Empty Program即可創建。

在中間的框框右鍵New File即可(記得,檔案名後要.cpp)。
創建完後,先點擊左上角的Import,在左上角的搜尋,輸入mbed並點擊兩下第一個,即可安裝。
之後,我們回到前面的.cpp文件。
輸入以下程式碼:

注意:我們前面有#include,所以需要額外import程式庫,點選右上方的import,後在右邊的搜尋欄中輸入mbed,點擊框中黑框兩下即可安裝。

並點擊上方的Compile,待其跑完進度條,將新增的.bin檔案放入mbed板子,然後打開arduino的序列埠即可觀看數據。
以下是接線圖:

小知識:

線路中,R2 愈大,V=IR原理,V是常數5V,R愈大I就愈小(保護Arduino),但是,A2量到的電壓就愈高(壓降一點點)。
所以,若是要A2讀出的值高,R2就要愈大,可是,A2讀出的變化也不大(不靈敏)。
若要A2讀值靈敏一點(數值變動大),R2就要小一點,這樣壓降會在A2位置就會先發生。
以下為實測數據:


Bradleysab says:
ivermectin 1% cream generic https://stromectolivermectin19.com/# stromectol 3 mg dosage
ivermectin oral
Johnnieglymn says:
where to buy ivermectin pills ivermectin uk – ivermectin 1 cream
Johnnieglymn says:
ivermectin price usa ivermectin for humans – ivermectin cost uk
RodneyLycle says:
tadalafil without a doctor’s prescription pain meds without written prescription – canadian online drugs
RodneyLycle says:
india pharmacy cialis online pharmacy – trusted india online pharmacies
RodneyLycle says:
best online canadian pharmacy prescription without a doctor’s prescription – buy prescription drugs online legally
RodneyLycle says:
cvs prescription prices without insurance buy prescription drugs without doctor – ed drugs online from canada
RodneyLycle says:
ivermectin uk ivermectin generic cream – ivermectin price usa
Clintonginty says:
buying prednisone on line prednisone for sale – prednisone brand name in usa
Clintonginty says:
hydroxychloroquine 90 plaquenil hydroxychloroquine 200mg – plaquenil 200mg uk
Clintonginty says:
buy prednisone without prescription prednisone sale – prednisone 4mg tab
Clintonginty says:
zithromax 250 mg australia buy zithromax – zithromax for sale usa
Clintonginty says:
ivermectin 3mg tablets ivermectin tablets for humans pills – ivermectin new zealand
Clintonginty says:
prednisone 5 mg prednisone for sale – online order prednisone 10mg
DavidseN says:
cialis mit dapoxetine cheap cialis pills uk
DavidseN says:
dapoxetine and cialis online cialis for sale
Jerryalali says:
ivermectin 1 topical cream stromectol south africa
Jerryalali says:
can you buy stromectol over the counter ivermectin lotion price
AndreDroro says:
natural viagra viagra vs cialis
AndreDroro says:
viagra from canada viagra without doctor prescription
AndreDroro says:
cialis vs viagra blue pill viagra
AndreDroro says:
stromectol where to buy generic ivermectin
AndreDroro says:
viagra side effects п»їover the counter viagra
AndreDroro says:
buy cialis south africa cialis 10mg ireland
AndreDroro says:
discount cialis 20mg europe cialis
AndreDroro says:
ivermectin rx ivermectin over the counter
AndreDroro says:
generic plaquenil price plaquenil tablet canada
DavidChich says:
valtrex online pharmacy india valtrex – valtrex cream prescription
DavidChich says:
buying ventolin in usa ventolin generic – cheap ventolin
DavidChich says:
best generic wellbutrin 2017 wellbutrin xl – buy wellbutrin
DavidChich says:
nolvadex pct nolvadex generic – tamoxifen men
DavidChich says:
ventolin otc buy ventolin – buy ventolin
DavidChich says:
can i buy ventolin online mexico ventolin generic – where to get ventolin cheap
DavidChich says:
buy valtrex online in usa valtrex generic prescription – valtrex generic sale
DonaldMum says:
lasix cheap generic drugs from india buy generic drugs online nolvadex buy generic drugs online
DonaldMum says:
clomid buy generic drugs online buy pills online cheap clomid generic ed pills from canada
DonaldMum says:
zithromax cheap generic drugs from canada cheap generic ed pills zoloft generic ed pills from canada
Richardlalty says:
https://viasild24.com/# how many sildenafil 20mg can i take
Richardlalty says:
https://ciatad24.online# cialis dosage frequency
Richardlalty says:
https://viasild24.com/# sildenafil 20 mg tablet
Richardlalty says:
http://ciatad24.com/# side effects of cialis 5mg
Richardlalty says:
https://viasild24.online/# sildenafil 20 mg tablet
Richardlalty says:
https://iverstrom24.com/# stromectol ivermectin dosage
Richardlalty says:
http://ciatad24.online/# side effects of cialis 5mg
Stevensek says:
http://plaquenils.online/ how much is plaquenil
Stevensek says:
http://plaquenils.com/ hydroxychloroquine 100 mg
Stevensek says:
http://baricitinibrx.com/ baricitinib coronavirus
Stevensek says:
http://stromectols.com/ ivermectin eye drops
Stevensek says:
http://bimatoprostrx.online/ bimatoprost ophthalmic solution careprost
Stevensek says:
https://baricitinibrx.com/ barikind
Stevensek says:
http://plaquenils.online/ plaquenil 200 mg 30 film tablet
MichaelHip says:
vesmwu https://stromectolr.com buy ivermectin
MichaelHip says:
vjqkiy https://stromectolr.com ivermectin 400 mg brands
MichaelHip says:
uatqio https://stromectolr.com stromectol price
MichaelHip says:
plaquenil 200mg tablet cost plaquenilsnw canadian pharmacy plaquenil
zsupzr
www.costanorte.ca says:
Having breathtaking design and awesome digital
audio these Online-Video Pokies are one step prior to the significantly afterwards types that
you can uncover in a bar-or casino.
www.trendjapan.biz says:
To ensure that you are paid and asked regarding potential work, every undertaking much be completed in a
completely expert fashion with a high-level of focus on aspect.
dialedinoutdoors.com says:
Für die daß Casinos, die Rookie Spieler kann suchen verwandte Kriterien wie der Person – geholfen Bestimmungen und zusammen ein low home Rand.
aabbx.store says:
Дед Инсайд
CarolPriox says:
https://stromectol1st.com/# ivermectin buy online
ivermectin 1 cream
CarolPriox says:
http://stromectol1st.com/# ivermectin new zealand
ivermectin pills canada
CarolPriox says:
http://stromectol1st.online/# stromectol 3mg cost
ivermectin new zealand
FrankAmask says:
http://stromectolst.com/# stromectol drug
stromectol cost
FrankAmask says:
https://stromectolst.com/# ivermectin ebay
ivermectin gel
EmanuelVAT says:
https://stromectolis.com/# buy stromectol pills
EmanuelVAT says:
https://stromectolis.com/# ivermectin human
EmanuelVAT says:
https://stromectolis.com/# ivermectin lotion
striplife.ru says:
striplife.ru
nakushetke.ru says:
nakushetke.ru
dolpsy.ru says:
dolpsy.ru
lastduel.ru says:
lastduel.ru
k-tv.ru says:
k-tv.ru
498 says:
498
612 says:
612
1362 says:
1362
1359 says:
1359
1329 says:
1329
749 says:
749
1073 says:
1073
тарасов станислав says:
тарасов станислав
pqkino.ru says:
pqkino.ru
artist-bio.ru says:
artist-bio.ru
artist-bio.ru says:
artist-bio.ru
Средства общения says:
Средства общения
миямо и сасаки says:
Your means of explaining all in this paragraph is really fastidious, all be able to simply be aware of it, Thanks a
lot.
кинокрад says:
кинокрад
Виртуоз says:
Виртуоз
Психолог онлайн says:
Психолог онлайн
medunitsa.ru says:
medunitsa.ru
mgfmail.ru says:
mgfmail.ru
company-blog.ru says:
company-blog.ru
крым 2023 says:
крым 2023
apo2888 says:
Dear immortals, I need some wow gold inspiration to create.