Patrick Fitzgerald
Published

Codeblocks upload program to Arduino Uno

Codeblocks is an Interactive Design Environment (IDE) for developing software. We will use Codeblocks to upload to an Arduino board.

IntermediateProtip1 hour2,207
Codeblocks upload program to Arduino Uno

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

codeblocks

Story

Read more

Code

main.c

C/C++
C program file for AVR programming
Binary count on PORTB
// PORTB is an 8bit number at address 0x24
// #define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>
int main(void){  DDRB = 0xFF;   // PORTB is output
	    while(1){PORTB++;       // increment PORTB
		  _delay_ms(100);	}}

Credits

Patrick Fitzgerald

Patrick Fitzgerald

117 projects • 39 followers

Comments