Skip to content

Commit

Permalink
Merge pull request #1 from HTM-Workshop/capture_modes
Browse files Browse the repository at this point in the history
Capture modes
  • Loading branch information
BB121-LAB committed Mar 1, 2023
2 parents 74d6723 + 56af496 commit fb6f343
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package_builds/
package_builds
*.log
2 changes: 1 addition & 1 deletion arduino_connect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* DIY Spiker unit controller - v1.0
/* DIY Spiker unit controller - v1.2
Written by Kevin Williams
10/26/2020:
- Complete rewrite to match new hardware specifications
Expand Down Expand Up @@ -72,11 +72,20 @@ inline void __attribute__((optimize("O3"))) update_output(const int level) {
return;
}

ISR(TIMER1_OVF_vect) {
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
}

void setup(void) {
Serial.begin(115200);
String mode;
char buff[10];

// standby signal
TCCR1A = 0;
TCCR1B = 0x3;
TCNT1 = 0;
TIMSK1 = _BV(TOIE1); // enable TIMER2 overflow interrupt

// indicator
pinMode(LED_BUILTIN, OUTPUT);
Expand Down Expand Up @@ -146,6 +155,10 @@ void setup(void) {
// 0 = A0, 1 = A1
ADMUX = (1 << REFS0) | channel_select;
ADCSRA = 0x82;

// disable status led
TIMSK1 = 0;
digitalWrite(LED_BUILTIN, 0);
}


Expand Down

0 comments on commit fb6f343

Please sign in to comment.