Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
1º Workshop – Introdução
ao Arduino
Setembro 2015
Hack’Aveiro
Casa da Juventude de Aveiro
O que é o Arduino?
• Uma placa de circuito impresso
• Um software para programar
• É um movimento criado em 2005 por Massi...
Para que serve o Arduino?
• Prototipagem rápida
• Artistas e Hackers
• Aprendizagem de Eletrónica e
Informática
• Estudant...
Placas Arduino
Hack'Aveiro 2015 4
Arduino
• Microcontrolador ATMEL – ATmega328p, ...
• Voltagem 3.3v, 5v, 7-12v
• Corrente máxima por pin: 40mA
• Regulador ...
Como programar
• Fazer download do IDE
• http://arduino.cc/en/Guide/HomePage
• Ligar a placa ao computador através de um c...
Configuração do IDE Arduino
Hack'Aveiro 2015 7
Processo de desenvolvimento
Escrever
Sketch
Compilar Upload
Hack'Aveiro 2015 8
1º Programa – Olá Mundo
Hack'Aveiro 2015 9
Aquisição de Sinais
(Analógico e Digital)
• A natureza é analógica
• O microcontrolador é digital
• Converção entre sinais...
2º Programa
Hack'Aveiro 2015 11
LED’s
• Light-Emitting Diode
• Apenas emite luz quando o ânodo (+)
tem um potencial superior ao cátodo (-)
na ordem dos 2-...
3º Programa
1. Construa o circuito
2. Escreva um programa que utilize uma
porta digital para ler o valor do botão.
Imprima...
Analógico para Digital
• Converter um unidade analógica
em digital no Arduino:
• 10-bit – significa que um valor
entre 0 e...
4º Programa
1. Construa o circuito
2. Escreva um programa que utilize uma
porta analogica para ler o valor do
potenciometr...
Digital para Analógico
• Arduino não produz sinais analógicos nem tensões
intermédia (0v-5v)
• PWM (Pulse-Width Modulation...
5º Programa
1. Construa o circuito com base no circuito
anterior
2. Em vez de ligar e desligar o LED, vamos
controlar a in...
Imaginação é o Limite!
Hack'Aveiro 2015 18
Pressão Temp/Hum Com. Radio Bluetooth Ethernet
Relay Servo Motor Fluxo CO2, CO,...
Obrigado!
Hack'Aveiro 2015 19
Brevemente:
- Workshop Intermédio (I2C, Sensores)
Nächste SlideShare
Wird geladen in …5
×

Hack'Aveiro - 1º workshop - Introdução ao Arduino

923 Aufrufe

Veröffentlicht am

Workshop de introdução ao Arduino realizada a 13 de Setembro de 2015 na Casa da Juventude em Aveiro.
Principios base de portas Digitais e Analógicas.

Veröffentlicht in: Geräte & Hardware
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Hack'Aveiro - 1º workshop - Introdução ao Arduino

  1. 1. 1º Workshop – Introdução ao Arduino Setembro 2015 Hack’Aveiro Casa da Juventude de Aveiro
  2. 2. O que é o Arduino? • Uma placa de circuito impresso • Um software para programar • É um movimento criado em 2005 por Massimo Banzi e David Cuartielles • Plataforma de hardware open-source • Ambiente de desenvolvimento open-source • Mais info https://www.arduino.cc Hack'Aveiro 2015 2
  3. 3. Para que serve o Arduino? • Prototipagem rápida • Artistas e Hackers • Aprendizagem de Eletrónica e Informática • Estudantes e Hobistas Hack'Aveiro 2015 3
  4. 4. Placas Arduino Hack'Aveiro 2015 4
  5. 5. Arduino • Microcontrolador ATMEL – ATmega328p, ... • Voltagem 3.3v, 5v, 7-12v • Corrente máxima por pin: 40mA • Regulador de Tensão • Portas • Serie (via USB) • Digitais • Analogicas (10bit ADC) • Interrupts • Pulse Width Modulation (PWM) • LED Built-in Hack'Aveiro 2015 5
  6. 6. Como programar • Fazer download do IDE • http://arduino.cc/en/Guide/HomePage • Ligar a placa ao computador através de um cabo USB • Se necessário, instalar os drivers • Executar o Arduino IDE • Selecionar a placa • Selecionar a porta de serie • Abrir o exemplo “Blink program” • Carregar o programa para a placa Hack'Aveiro 2015 6
  7. 7. Configuração do IDE Arduino Hack'Aveiro 2015 7
  8. 8. Processo de desenvolvimento Escrever Sketch Compilar Upload Hack'Aveiro 2015 8
  9. 9. 1º Programa – Olá Mundo Hack'Aveiro 2015 9
  10. 10. Aquisição de Sinais (Analógico e Digital) • A natureza é analógica • O microcontrolador é digital • Converção entre sinais • ADC – Analog to Digital Converter • DAC – Digital to Analog Converter • Arduino possui portas distintas • A0, A1, A2, A3, ... – Ligadas a ADC • D0, D1, D2, D3, ... – Aquisição digital (0/1) Configuração da porta: pinMode(pin, mode) – pin é o numero e mode é INPUT ou OUTPUT digitalRead(pin) digitalWrite(pin, value) – value é HIGH ou LOW (1 ou 0) Hack'Aveiro 2015 10 Image from: http://www.thefoa.org/tech/ref/OSP/OSPdatalink.html http://www.ntu.edu.sg/home/eomchai/www.ntu.edu.sg/home/yanggao/EEEWorkshop/workshop.html
  11. 11. 2º Programa Hack'Aveiro 2015 11
  12. 12. LED’s • Light-Emitting Diode • Apenas emite luz quando o ânodo (+) tem um potencial superior ao cátodo (-) na ordem dos 2-3,5volts. • O cátodo tem uma “perna” mais curta, ou o seu lado encontra-se lascado. • Uma corrente elevada pode danificar o LED • Colocar sempre uma resistência em serie Hack'Aveiro 2015 12 Image from: http://www.ntu.edu.sg/home/eomchai/www.ntu.edu.sg/home/yanggao/EEEWorkshop/workshop.html
  13. 13. 3º Programa 1. Construa o circuito 2. Escreva um programa que utilize uma porta digital para ler o valor do botão. Imprima o valor do botão no ecrã: Serial.println(valor_lido); 3. Se o botão for pressionado (valor digital = 1) então ligar o LED utilizando outra porta digital Hack'Aveiro 2015 13 Descodificador de Resistencias: http://www.hobby-hour.com/electronics/resistorcalculator.php
  14. 14. Analógico para Digital • Converter um unidade analógica em digital no Arduino: • 10-bit – significa que um valor entre 0 e 5v é convertido num valor entre 0 e 1023. • Velocidade de amostragem 10kHz analogRead(pin) – pin é o numero (A0, A1, A2, ...) Hack'Aveiro 2015 14
  15. 15. 4º Programa 1. Construa o circuito 2. Escreva um programa que utilize uma porta analogica para ler o valor do potenciometro. Imprima o valor do botão no ecrã: Serial.println(valor_lido); 3. Se o valor lido for superior a um valor X (ex. 200), então ligar o led. Hack'Aveiro 2015 15
  16. 16. Digital para Analógico • Arduino não produz sinais analógicos nem tensões intermédia (0v-5v) • PWM (Pulse-Width Modulation) permite “enganar” a realidade • Sinal digital • onda quadrada de frequência constante Configuração da porta: analogWrite(pin, dutyCycle) – pin é o numero e dutyCycle é um valor [0, 255] • Como converter uma posição de um intervalo para a mesma posição em intervalo distinto. novoValor = map(valor, 0, 1024, 0, 255) converte valor compreendido em [0, 1024] em novoValor compreendido em [0, 255] Hack'Aveiro 2015 16
  17. 17. 5º Programa 1. Construa o circuito com base no circuito anterior 2. Em vez de ligar e desligar o LED, vamos controlar a intensidade do mesmo. Hack'Aveiro 2015 17
  18. 18. Imaginação é o Limite! Hack'Aveiro 2015 18 Pressão Temp/Hum Com. Radio Bluetooth Ethernet Relay Servo Motor Fluxo CO2, CO, etc LCD Movimento E MUITOS MAIS!!!!
  19. 19. Obrigado! Hack'Aveiro 2015 19 Brevemente: - Workshop Intermédio (I2C, Sensores)

×