SlideShare a Scribd company logo
1 of 36
Download to read offline
Hacking Cool things
          With
     Microcontrollers!
Mitch Altman
   
Chief Scientist, Cornfield Electronics, San Francisco, CA   USA
   
Author of The Brain Machine in MAKE Magazine #10
   
Inventor of TV-B-Gone universal remote control
   
email:   mitch@CornfieldElectronics.com
   site:     www.CornfieldElectronics.com

                                                    Codebits
                                                November 14, 2008
I Love My Job!
Why make cool things with
   Microcontrollers?
Why make cool things with
           Microcontrollers?
Microcontrollers are fun to play with




And anyone can learn…
Examples of Cool Microcontroller Projects
               (in my opinion)




                                   TV-B-Gone Kit




TV-B-Gone                        TV-B-Gone Pro
Examples of Cool Microcontroller Projects
                     (in my opinion)




   MiniPOV3 kit                              Solar BugBot




                     The Brain Machine

                                  LED Cube
  Trippy RGB Light
Examples of Cool Microcontroller Projects
                (in my opinion)




              Mignonnette Game kit
Examples of Cool Microcontroller Projects
                (in my opinion)




              Trippy RGB Waves kit
What is a Microcontroller?
What is a Microcontroller?

A complete computer on a chip (with a little extra stuff)


                                         RAM

 Program
                    Processor
 Memory
                                                     Inputs


                                      Input/Output
                                                     Outputs

                     Timers
What Does a Microcontroller Do?

         Like all computers:


           Fetch Instruction


          Execute Instruction


            Repeat forever (till power goes off)
How to Make Cool Things with
      Microcontrollers

       •  Idea

       •  Hardware

       •  Firmware

       •  Coolness!
Hello World

              Make an LED blink
Hello World – Hardware
          Battery +




                          Resistor   LED
        Microcontroller                    Battery -




          Battery -
Hello World – Digression:
         (Very) Basic Electronics Lesson
Electronics: electrons flowing through wires and parts
              (sorta like water flowing through pipes)

       Current -- speed of electrons flowing

       Battery -- like a pump pushing electrons

       Resistor -- like a kink in a pipe, slows down electrons

       Diode -- one-way valve for current

       LED -- special diode: emit photons when current flows

       Transistor -- remotely controlled switch

       Microcontroller -- zillions of transistors!
Hello World – Firmware

   Assign a value to a variable:

        Software:      X = 00000001

        Firmware:      X = 00000001
Hello World – Firmware

   Changing an output pin:



                  PortA = 00000001

                  PortA = 00000000
Hello World – Firmware

   Changing an output pin (using manual delay):



                  PortA = 00000001

                  Call Delay

                  PortA = 00000000

                 -----------
                   Delay:
                               Count = 0
                   Wait:
                               Count = Count + 1
                               If Count < 10,000 goto wait
                               Return
Hello World – Firmware

   Changing an output pin (using hardware timer):


               Main:
                  Call Init
                  PortA = 00000001
                  Call Delay
                  PortA = 00000000
                  Sleep

                 -----------
                   Delay:
                               Timer0 = 60,000
                   Wait:
                               If Timer0flag = 0 goto wait
                               Return
Hello World – Firmware
           Advanced topic:

           Changing an output pin (using interrupts):


                       Main:
                          Call Init
                          PortA = 00000001
                          Call Delay
                          PortA = 00000000
                          Sleep

                         -----------

ISR:                         Delay:
        TimeFlag=1                     Timer0 = 60,000
                             Wait:
        Return                         If TimeFlag = 0 goto wait
                                       Return
Hello World – programming your chip

   Use software on your computer
         Text Editor
         Compiler
         Programmer

   Specific software Depends on your microcontroller
                    PIC, AVR, etc.

   Need hardware programmer (often very cheap)
Real Project: Ladyada’s MiniPOV3
Just like “Hello World”,
       but 8 LEDs and different timing




                            Etc…
Hacking! :
               The easy way
to make your cool microcontroller projects
Hacking!
   TV-B-Gone from MiniPOV3 kit
Hacking!
 TV-B-Gone Kit from MiniPOV3 hack
Hacking!
 TV-B-Gone Pro from TV-B-Gone Kit
Hacking!
     Trippy RGB Light from MiniPOV3 kit




             ...             ...   1/2 brightness
  Pulse
  Width      ...             ...   1/4 brightness
Modulation
 (PWM)
             ...             ...   min brightness
Hacking!
Trippy RGB Waves kit from Trippy RGB Light




                         IR detector causes
                         interrupt when it sees IR
                         reflecting from your hand
Hacking!
  Solar BugBot from MiniPOV3 kit
Hacking!
    LED Cube from MiniPOV3 kit




                 (First NYC Resistor Project)
Hacking!
           Brain Machine from MiniPOV3 kit




            Synchronizes your brain to a desired brainwave sequence
                        (and hallucinate along the way!)
WARNING: Blinking lights are not good for people with epilepsy
Brain Machine
Video by Bre Pettis
What’s It Like?
Come by the Workshop
      Hardware Hacking Area
Microcontrollers are fun to play with




And anyone can learn!
Q&A
Hacking Cool things
          With
     Microcontrollers!
Mitch Altman
   
Chief Scientist, Cornfield Electronics, San Francisco, CA   USA
   
Author of The Brain Machine in MAKE Magazine #10
   
Inventor of TV-B-Gone universal remote control
   
email:   mitch@CornfieldElectronics.com
   site:     www.CornfieldElectronics.com

                                                    Codebits
                                                November 14, 2008

More Related Content

Viewers also liked

What is Mind Mapping? (English Version)
What is Mind Mapping? (English Version)What is Mind Mapping? (English Version)
What is Mind Mapping? (English Version)
MindProject
 
I build the future - Agile 2014
I build the future - Agile 2014I build the future - Agile 2014
I build the future - Agile 2014
Andrew Shafer
 

Viewers also liked (10)

Continuous heart rate and body temperature monitoring system using arduino un...
Continuous heart rate and body temperature monitoring system using arduino un...Continuous heart rate and body temperature monitoring system using arduino un...
Continuous heart rate and body temperature monitoring system using arduino un...
 
Mind mapping
Mind mapping Mind mapping
Mind mapping
 
Heart beat detector using arduino
Heart beat detector using arduinoHeart beat detector using arduino
Heart beat detector using arduino
 
MindMapping
MindMapping MindMapping
MindMapping
 
Heart beat monitor system PPT
Heart beat monitor system PPT Heart beat monitor system PPT
Heart beat monitor system PPT
 
Mind mapping.ppt final
Mind mapping.ppt finalMind mapping.ppt final
Mind mapping.ppt final
 
What is Mind Mapping? (English Version)
What is Mind Mapping? (English Version)What is Mind Mapping? (English Version)
What is Mind Mapping? (English Version)
 
MindMaps
MindMapsMindMaps
MindMaps
 
I build the future - Agile 2014
I build the future - Agile 2014I build the future - Agile 2014
I build the future - Agile 2014
 
Scott Lind - The Secret Life of EHRs
Scott Lind - The Secret Life of EHRsScott Lind - The Secret Life of EHRs
Scott Lind - The Secret Life of EHRs
 

Similar to Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)

Seminar 3 presentation
Seminar 3 presentationSeminar 3 presentation
Seminar 3 presentation
chandnivenkat
 

Similar to Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder) (20)

Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Lecture1
Lecture1Lecture1
Lecture1
 
ATTiny85 ATTiny45 and ATTiny13 based projects list - ATMega32 AVR.pdf
ATTiny85 ATTiny45 and ATTiny13 based projects list - ATMega32 AVR.pdfATTiny85 ATTiny45 and ATTiny13 based projects list - ATMega32 AVR.pdf
ATTiny85 ATTiny45 and ATTiny13 based projects list - ATMega32 AVR.pdf
 
Build cool stuff with arduino for sci camp 16 dec13
Build cool stuff with arduino for sci camp 16 dec13Build cool stuff with arduino for sci camp 16 dec13
Build cool stuff with arduino for sci camp 16 dec13
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Avr microcontroller
Avr microcontrollerAvr microcontroller
Avr microcontroller
 
ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)ATTiny Light Sculpture Project - Part I (Setup)
ATTiny Light Sculpture Project - Part I (Setup)
 
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
 
Advanced view pic microcontroller projects list pic microcontroller
Advanced view pic microcontroller projects list   pic microcontrollerAdvanced view pic microcontroller projects list   pic microcontroller
Advanced view pic microcontroller projects list pic microcontroller
 
Seminar 3 presentation
Seminar 3 presentationSeminar 3 presentation
Seminar 3 presentation
 
Microcontrollers (Rex St. John)
Microcontrollers (Rex St. John)Microcontrollers (Rex St. John)
Microcontrollers (Rex St. John)
 
An_Introduction_to_Microcontrollers.pptx
An_Introduction_to_Microcontrollers.pptxAn_Introduction_to_Microcontrollers.pptx
An_Introduction_to_Microcontrollers.pptx
 
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdfAdvanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
Advanced View of Atmega Microcontroller Projects List - ATMega32 AVR.pdf
 
Arduino Introduction by coopermaa
Arduino Introduction by coopermaaArduino Introduction by coopermaa
Arduino Introduction by coopermaa
 
Arduino
Arduino Arduino
Arduino
 
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
 
IoT Programming with IchigoJam
IoT Programming with IchigoJamIoT Programming with IchigoJam
IoT Programming with IchigoJam
 
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
Advanced View of Atmega Microcontroller Projects List - Projects Tutorials Co...
 
Powerful Electronics with Arduino
Powerful Electronics with ArduinoPowerful Electronics with Arduino
Powerful Electronics with Arduino
 

More from codebits

Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands On
codebits
 
Aplicações Web TV no Meo
Aplicações Web TV no MeoAplicações Web TV no Meo
Aplicações Web TV no Meo
codebits
 
Forms Usability 101
Forms Usability 101Forms Usability 101
Forms Usability 101
codebits
 
Speak up: como criar Speech-based apps
Speak up: como criar Speech-based appsSpeak up: como criar Speech-based apps
Speak up: como criar Speech-based apps
codebits
 
XMPP Hands-On
XMPP Hands-OnXMPP Hands-On
XMPP Hands-On
codebits
 
Mitos da Acessibilidade Web
Mitos da Acessibilidade WebMitos da Acessibilidade Web
Mitos da Acessibilidade Web
codebits
 
Getting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko FreerunnerGetting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko Freerunner
codebits
 
Getting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko FreerunnerGetting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko Freerunner
codebits
 
Exploring XMPP
Exploring XMPPExploring XMPP
Exploring XMPP
codebits
 
Sapo BUS Hands-On
Sapo BUS Hands-OnSapo BUS Hands-On
Sapo BUS Hands-On
codebits
 
Qtractor - An Audio/MIDI multi-track sequencer
Qtractor - An Audio/MIDI multi-track sequencerQtractor - An Audio/MIDI multi-track sequencer
Qtractor - An Audio/MIDI multi-track sequencer
codebits
 
Making the Chumby
Making the ChumbyMaking the Chumby
Making the Chumby
codebits
 
Globs - Gestão de Glossários
Globs - Gestão de GlossáriosGlobs - Gestão de Glossários
Globs - Gestão de Glossários
codebits
 
ATrad - Sistema de Garantia de Qualidade de Traduções
ATrad - Sistema de Garantia de Qualidade de TraduçõesATrad - Sistema de Garantia de Qualidade de Traduções
ATrad - Sistema de Garantia de Qualidade de Traduções
codebits
 
Alto Desempenho com Java
Alto Desempenho com JavaAlto Desempenho com Java
Alto Desempenho com Java
codebits
 
Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-On
codebits
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
codebits
 
Optimização de pesquisas Web utilizando Colónias de Formigas
Optimização de pesquisas Web utilizando Colónias de FormigasOptimização de pesquisas Web utilizando Colónias de Formigas
Optimização de pesquisas Web utilizando Colónias de Formigas
codebits
 

More from codebits (20)

Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands On
 
Aplicações Web TV no Meo
Aplicações Web TV no MeoAplicações Web TV no Meo
Aplicações Web TV no Meo
 
Forms Usability 101
Forms Usability 101Forms Usability 101
Forms Usability 101
 
Speak up: como criar Speech-based apps
Speak up: como criar Speech-based appsSpeak up: como criar Speech-based apps
Speak up: como criar Speech-based apps
 
XMPP Hands-On
XMPP Hands-OnXMPP Hands-On
XMPP Hands-On
 
Mitos da Acessibilidade Web
Mitos da Acessibilidade WebMitos da Acessibilidade Web
Mitos da Acessibilidade Web
 
Getting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko FreerunnerGetting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko Freerunner
 
CouchDB
CouchDBCouchDB
CouchDB
 
Getting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko FreerunnerGetting started with mobile devices development - Openmoko Freerunner
Getting started with mobile devices development - Openmoko Freerunner
 
Exploring XMPP
Exploring XMPPExploring XMPP
Exploring XMPP
 
Sapo BUS Hands-On
Sapo BUS Hands-OnSapo BUS Hands-On
Sapo BUS Hands-On
 
Qtractor - An Audio/MIDI multi-track sequencer
Qtractor - An Audio/MIDI multi-track sequencerQtractor - An Audio/MIDI multi-track sequencer
Qtractor - An Audio/MIDI multi-track sequencer
 
Making the Chumby
Making the ChumbyMaking the Chumby
Making the Chumby
 
Globs - Gestão de Glossários
Globs - Gestão de GlossáriosGlobs - Gestão de Glossários
Globs - Gestão de Glossários
 
ATrad - Sistema de Garantia de Qualidade de Traduções
ATrad - Sistema de Garantia de Qualidade de TraduçõesATrad - Sistema de Garantia de Qualidade de Traduções
ATrad - Sistema de Garantia de Qualidade de Traduções
 
Alto Desempenho com Java
Alto Desempenho com JavaAlto Desempenho com Java
Alto Desempenho com Java
 
Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-On
 
Gis@sapo
Gis@sapoGis@sapo
Gis@sapo
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
 
Optimização de pesquisas Web utilizando Colónias de Formigas
Optimização de pesquisas Web utilizando Colónias de FormigasOptimização de pesquisas Web utilizando Colónias de Formigas
Optimização de pesquisas Web utilizando Colónias de Formigas
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)

  • 1. Hacking Cool things With Microcontrollers! Mitch Altman Chief Scientist, Cornfield Electronics, San Francisco, CA USA Author of The Brain Machine in MAKE Magazine #10 Inventor of TV-B-Gone universal remote control email: mitch@CornfieldElectronics.com site: www.CornfieldElectronics.com Codebits November 14, 2008
  • 2. I Love My Job!
  • 3. Why make cool things with Microcontrollers?
  • 4. Why make cool things with Microcontrollers? Microcontrollers are fun to play with And anyone can learn…
  • 5. Examples of Cool Microcontroller Projects (in my opinion) TV-B-Gone Kit TV-B-Gone TV-B-Gone Pro
  • 6. Examples of Cool Microcontroller Projects (in my opinion) MiniPOV3 kit Solar BugBot The Brain Machine LED Cube Trippy RGB Light
  • 7. Examples of Cool Microcontroller Projects (in my opinion) Mignonnette Game kit
  • 8. Examples of Cool Microcontroller Projects (in my opinion) Trippy RGB Waves kit
  • 9. What is a Microcontroller?
  • 10. What is a Microcontroller? A complete computer on a chip (with a little extra stuff) RAM Program Processor Memory Inputs Input/Output Outputs Timers
  • 11. What Does a Microcontroller Do? Like all computers: Fetch Instruction Execute Instruction Repeat forever (till power goes off)
  • 12. How to Make Cool Things with Microcontrollers •  Idea •  Hardware •  Firmware •  Coolness!
  • 13. Hello World Make an LED blink
  • 14. Hello World – Hardware Battery + Resistor LED Microcontroller Battery - Battery -
  • 15. Hello World – Digression: (Very) Basic Electronics Lesson Electronics: electrons flowing through wires and parts (sorta like water flowing through pipes) Current -- speed of electrons flowing Battery -- like a pump pushing electrons Resistor -- like a kink in a pipe, slows down electrons Diode -- one-way valve for current LED -- special diode: emit photons when current flows Transistor -- remotely controlled switch Microcontroller -- zillions of transistors!
  • 16. Hello World – Firmware Assign a value to a variable: Software: X = 00000001 Firmware: X = 00000001
  • 17. Hello World – Firmware Changing an output pin: PortA = 00000001 PortA = 00000000
  • 18. Hello World – Firmware Changing an output pin (using manual delay): PortA = 00000001 Call Delay PortA = 00000000 ----------- Delay: Count = 0 Wait: Count = Count + 1 If Count < 10,000 goto wait Return
  • 19. Hello World – Firmware Changing an output pin (using hardware timer): Main: Call Init PortA = 00000001 Call Delay PortA = 00000000 Sleep ----------- Delay: Timer0 = 60,000 Wait: If Timer0flag = 0 goto wait Return
  • 20. Hello World – Firmware Advanced topic: Changing an output pin (using interrupts): Main: Call Init PortA = 00000001 Call Delay PortA = 00000000 Sleep ----------- ISR: Delay: TimeFlag=1 Timer0 = 60,000 Wait: Return If TimeFlag = 0 goto wait Return
  • 21. Hello World – programming your chip Use software on your computer Text Editor Compiler Programmer Specific software Depends on your microcontroller PIC, AVR, etc. Need hardware programmer (often very cheap)
  • 22. Real Project: Ladyada’s MiniPOV3 Just like “Hello World”, but 8 LEDs and different timing Etc…
  • 23. Hacking! : The easy way to make your cool microcontroller projects
  • 24. Hacking! TV-B-Gone from MiniPOV3 kit
  • 25. Hacking! TV-B-Gone Kit from MiniPOV3 hack
  • 26. Hacking! TV-B-Gone Pro from TV-B-Gone Kit
  • 27. Hacking! Trippy RGB Light from MiniPOV3 kit ... ... 1/2 brightness Pulse Width ... ... 1/4 brightness Modulation (PWM) ... ... min brightness
  • 28. Hacking! Trippy RGB Waves kit from Trippy RGB Light IR detector causes interrupt when it sees IR reflecting from your hand
  • 29. Hacking! Solar BugBot from MiniPOV3 kit
  • 30. Hacking! LED Cube from MiniPOV3 kit (First NYC Resistor Project)
  • 31. Hacking! Brain Machine from MiniPOV3 kit Synchronizes your brain to a desired brainwave sequence (and hallucinate along the way!) WARNING: Blinking lights are not good for people with epilepsy
  • 33. Video by Bre Pettis What’s It Like?
  • 34. Come by the Workshop Hardware Hacking Area Microcontrollers are fun to play with And anyone can learn!
  • 35. Q&A
  • 36. Hacking Cool things With Microcontrollers! Mitch Altman Chief Scientist, Cornfield Electronics, San Francisco, CA USA Author of The Brain Machine in MAKE Magazine #10 Inventor of TV-B-Gone universal remote control email: mitch@CornfieldElectronics.com site: www.CornfieldElectronics.com Codebits November 14, 2008