??????????(1/3) Analog Input/Output - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

??????????(1/3) Analog Input/Output

Description:

(1/3) Analog Input/Output Chin-Shiuh Shieh ( ) http://bit.kuas.edu.tw/~csshieh Department of Electronic Engineering – PowerPoint PPT presentation

Number of Views:140
Avg rating:3.0/5.0
Slides: 8
Provided by: ChinS155
Category:
Tags: analog | input | output

less

Transcript and Presenter's Notes

Title: ??????????(1/3) Analog Input/Output


1
??????????(1/3)Analog Input/Output
  • Chin-Shiuh Shieh (???)
  • http//bit.kuas.edu.tw/csshieh
  • Department of Electronic Engineering
  • National Kaohsiung University of Applied
    Sciences, Taiwan

2
Analog Input/Output
3
Analog Input/Output (cont)
  • pinMode(pin,mode)
  • analogRead(pin)
  • analogWrite(pin,value) // Pulse Width Modulation
    (PWM)

4
Example VR
5
Example VR (cont)
  • void setup()
  • Serial.begin(9600)
  • void loop()
  • Serial.println(analogRead(A0))

6
Example DC Motor
7
Example DC Motor (cont)
  • void setup()
  • pinMode(2,OUTPUT)
  • void loop()
  • int vranalogRead(A0)
  • analogWrite(2,vr/4)analogWrite(13,vr/4)
  • delay(100)
Write a Comment
User Comments (0)
About PowerShow.com