Skip to content

Instantly share code, notes, and snippets.

View snaewe's full-sized avatar

Stefan Naewe snaewe

  • Planet Earth (UTC+2)
View GitHub Profile
@adnbr
adnbr / attiny13-adc-pwm.c
Last active June 12, 2024 10:32
ADC input directly to PWM output, on an ATtiny13.
/* ---------------------------------------------------------------------
* PWM LED Brightness control for ATtiny13.
* Datasheet for ATtiny13: http://www.atmel.com/images/doc2535.pdf
*
* Pin configuration -
* PB1/OC0B: LED output (Pin 6)
* PB2/ADC1: Potentiometer input (Pin 7)
*
* ~100 bytes.
*
//
// GNU GPL v2
// [email protected]
// hydraraptor.blogspot.com
//
// Adapts ESP12 module to 0.1" grid.
//
eps = 1/128; // small fudge factor to stop CSG barfing on coincident faces.
layer_height = 0.25; // slicer layer height
extrusion_width = 0.5; // slicer extrusion width