Skip to Content
自造手冊:新工業革命實務指南
book

自造手冊:新工業革命實務指南

by Paolo Aliverti, Andrea Maietta
March 2017
Intermediate to advanced
232 pages
4h 44m
Chinese
GoTop Information, Inc.
Content preview from 自造手冊:新工業革命實務指南
初級草稿碼
157
loop 函式會執行一次之後再次啟動,如
此不斷重複直到您拔掉電源為止。練習
看看,修改程式讓 LED 以 0.1 秒的間隔
閃爍 20 次。
您 也 可 以 用 別 的 方 法 來 計 數 — 數 值 遞
減,使用 i--(i=i-1 的簡寫);或是用等
差級數跳著數,若等差級數為 2,則指
令使用 i=i+2。
超越數位
目前,您都只用到數位變數:不是開就
是關,不是 1 就是 0。然而,真實世界並
不是非黑即白,黑白之間還有許多顏色。
類比感測器(如本書
第 132 頁“電位器與
電位計”
中的電位計)便可以提供黑白
之間的灰階部分。還有許多其他的感測
器,可以讀取不同的參數,幫助 Arduino
執 行 指 令。 由 Tero Karvinen、Kimmo
Karvenen、Ville Valtokari 合著的《Make:
感測器|運用 Arduino 和 Raspberry Pi 感
測的專題與實驗》中,即介紹各種感測
器的教學實作。
我完全部分同意
前 一 個 章 節 中 所 看 到 的 腳 位 只 能 讀 取
數 位 訊 號。 可 喜 可 賀 的 是,Arduino 上
A0~A5 之間的所有腳位也可以讀取到類
比訊號,如
圖 16-10
所示。
範例 16-6
閃爍次數不至於閃瞎眼睛的指令
void loop()
{
//
按鈕被按下
if (digitalRead(button) == HIGH)
{
for (inti = 0; i< 10; i++) // for
迴圈開始
{
digitalWr ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

網頁互動式資料視覺化:使用D3

網頁互動式資料視覺化:使用D3

Scott Murray
優雅的SciPy|Python科學研究的美學

優雅的SciPy|Python科學研究的美學

Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
深入淺出代數

深入淺出代數

Tracey Pilone, Dan Pilone

Publisher Resources

ISBN: 9789864763238