Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Patrick Fitzgerald
Published

C Program with Arduino IDE

We write an Arduino sketch using the C programming language.

IntermediateProtip3 hours3,881

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

Patrick Fitzgerald

118 projects • 40 followers

Comments