Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Hackster is hosting Impact Spotlights: Smart Home. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Smart Home. Stream on Thursday!
Patrick Fitzgerald
Published

C Program with Arduino IDE

We write an Arduino sketch using the C programming language.

IntermediateProtip3 hours4,274

Things used in this project

Software apps and online services

Arduino IDE
Arduino IDE
simulide

Story

Read more

Code

BlinC.ino

Arduino
Arduino sketch using C code and binary blink
// blink LED on PORTB pin 5
#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
int main (void) {  DDRB =0b00100000; 
      while(1)  {  PORTB=0b00000000; _delay_ms(500);  
                   PORTB=0b00100000; _delay_ms(500); }}

Credits

Patrick Fitzgerald
124 projects • 44 followers
Contact

Comments

Please log in or sign up to comment.