This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
#include <MemoryFree.h> | |
const byte ledsPin = 3; | |
const byte sensorPin = A1; | |
const int numLeds = 300; | |
const int ledTime = 1000; | |
const int sensorMin = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set board = bs | |
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe" -fI -o %board%.hex -e %board%.eeprom tgy.asm | |
avrdude -c stk500v2 -b 9600 -P COM4 -u -p m8 -U flash:w:%board%.hex:i | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
u32TimeCounter | |
stepper object properties: | |
u8PulsePinState | |
u8DirPinState | |
u8WriteDir | |
u32LastStepTime | |
u32NextStepTime | |
f32StepDistance_um |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <cmath> | |
#include <stdio.h> | |
#include <algorithm> | |
using namespace std; | |
#define Lint8 char | |
#define Luint8 unsigned char | |
#define Lint16 short int | |
#define Luint16 unsigned short int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint16_t pusherTimeout = 300; // ms | |
const uint16_t pusherDebounceTime = 50; // ms | |
const uint8_t pusherMotorPin; | |
const uint8_t ccSwitchPin; | |
uint32_t time = 0; | |
uint32_t pusherTimeOn = 0; | |
uint32_t pusherTimeOff = 0; |