porklib: Simple library for programming Arduino in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Ondřej Hruška 1802d9a6b2 mkfl 9 years ago
examples mkfl 9 years ago
lib added keyhandler example 9 years ago
lib_tests source import 9 years ago
.gitignore improved a makefile 9 years ago
Example_Makefile.txt added example makefile 9 years ago
LICENSE Initial commit 9 years ago
README.md yupo 9 years ago

README.md

MightyPork's AVR Library

I program my Arduinos in plain C, compile it with avr-gcc and flash with avrdude (all on Linux).

Whenever I learn how to do something, I make a library file and put it here.

The code is tested and optimized for ATmega328P, which is used in most Arduinos. I use "Pro Mini" and "Nano".

How to use

Link the lib/ folder to your project, and make sure you add all lib .c files to your Makefile, so it builds are the needed code.

Some library files don't have .c, but many do.

Useful things

  • To easily alias I/O pins, use lib/pins.h.
  • For Arduino pins, there are presets in lib/arduino_pins.h
  • Binary/byte manipulation utilities are in lib/calc.h
  • lib/meta.h contains some generally useful things that didn't fit elsewhere

Each header file contains a comment block with explanation, which will help you understand them.