uni

Thing1's amazing uni repo
Log | Files | Refs

commit b0cbe666ccf9a12ba717329ffccbfc51c5a22d60
parent 9bc80e9d4b28dad3460d3a577619ab0248083bd8
Author: thing1 <thing1@seacrossedlovers.xyz>
Date:   Wed,  3 Dec 2025 14:21:54 +0000

finished robot

Diffstat:
ACS12020/01.12.25.md | 12++++++++++++
MCS12020/robot/line/line.ino | 12++++++------
AMP10610/02.12.25.md | 4++++
MPH16210/27.11.25.md | 4++--
4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/CS12020/01.12.25.md b/CS12020/01.12.25.md @@ -0,0 +1,12 @@ +01/12/25 +======== + +What to write in the report +--------------------- + +- write what worked +- write what didn't + - algos, not syntax +- what i'd do differently +- what i think my code is worth + - aim for things around 60% or so, they can mark it higher, but being over confident is bad diff --git a/CS12020/robot/line/line.ino b/CS12020/robot/line/line.ino @@ -1,6 +1,6 @@ #include "helper.h" -#define DEBUG +#define DEBUG_NAH #ifdef DEBUG #define DBG(expr) expr; @@ -19,8 +19,6 @@ typedef struct state { long gstate, ystate, rstate; } state; -uint8_t flashCount = 0; - void flash(int pin, state *s) { switch (pin) { @@ -32,6 +30,8 @@ flash(int pin, state *s) { void stepFlash(int pin) { + static uint8_t flashCount; + DBG({ SEprintf("Flashcount: %d\n", flashCount); }); @@ -40,7 +40,7 @@ stepFlash(int pin) { digitalWrite(pin, HIGH); else if (flashCount > FLASHTIME / 2) digitalWrite(pin, LOW); - flashCount += 5; + flashCount++; } void @@ -101,7 +101,7 @@ getState() { void stepAvoidanceBehave(state *s) { - /* should flash red */ + flash(RED_LED, s); DBG({ /* WARNING this causes the program to stutter when left on, not too bad for debugging but very bad for general use! */ @@ -121,7 +121,7 @@ stepAvoidanceBehave(state *s) { void stepAttractionBehave(state *s) { - /* should flash green */ + flash(GREEN_LED, s); DBG({ SEprintf("Attract: %d, %d, %d\n", s->rawleft, s->rawmid, s->rawright); }); diff --git a/MP10610/02.12.25.md b/MP10610/02.12.25.md @@ -0,0 +1,4 @@ +02/12/25 +======== + +- you can have an asymptote on a slant in the form y = mx + c diff --git a/PH16210/27.11.25.md b/PH16210/27.11.25.md @@ -1,2 +1,3 @@ 27/11/25 -======== -\ No newline at end of file +======== +