bn  
 
Home

Assignments


bull Final project Proposal

bull Vinylcutter, lasercutter
bull PCB fabrication, board stuffing
bullWaterjet cutter, CNC mill, Router
bull
Microcontroller programming
bull 3D scanning and printing
bull Input devices
bull Molding and Casing
bullOutput devices
bull Composites, joining
bullNetworking and communications
bull Final project preparation
bull Final project presentations

Contact

email: dzanfaly [at]mit [dot] edu

 
Microcontroller programming  
 mmm

 

 
mmmmmm  
       
    llll  
    Bloooming Microcontroller  
    lll  
       
    kk  
       
    lll  
       
    ll  
       
    ll\  
       
   

 
     
   

// Blooming Microcontrolller
#include <avr/io.h>
#define F_CPU 1e6
#include <avr/delay.h>

#define TRUE 1
#define FALSE 0

int main()
{
//SETUP
//Button is on PB2
//LED is PA3

PORTA = _BV(PA3); //Turn button pullup resistor on

DDRB = _BV(PB2); //Enable output on the LED pin

//LOOP
while (TRUE)
{
PORTB = _BV(PB2);
_delay_ms(200);
PORTB = 0;
_delay_ms(200);
}
}