Still gay

I GOT AN 80%

I finished it ⭐

I'll keep on tomorrow... This is the last barrier for the very least I need to turn this in

I can try one of the real time scheduling libraries, since I'm gonna have to use one to turn the project in...

Having...a lot of trouble with debouncing, for some reason... It's getting pretty frustrating

Hmm... Might have to debounce the sensor inputs... I get some state changes even when it should be a constant 0 or 1, it's screwing with the distance algorithm

I was using the formula for the fricking area instead of the circumference, I'm gonna be an engineer and I got that wrong

My brother realized that and he's laughing at me

I'm Italian so if you call me out for my protoboard looking like a plate of pasta it's racist

Hang on I can count both transitions and double the precision, I'm dumb

That's 33.2/40 = 0.83cm

6 transitions is roughly 10cm... I'll make my next goal this: move the wheel the equivalent of 10cm on the ground when I press a button

Wheel diameter is ~6.5cm, then circumference is ~33.2cm

Slotted wheel has 20 slots, meaning every transition translates into ~1.66cm of distance covered...

Well, now comes the actual software work...

Also by checking which of the two receivers changes first I can know the rotation direction, but for now it's set up to only rotate in one direction

If I have time, I can add an L298N H-bridge to fully control two wheels... I've worked with them last year

What this lets me do is grab a DC motor, put one of these wheels with slots on one side, and by counting how many times I get a transition from zero to one I can count how much the wheel has spun, and translate that to the distance it moved

So basically each purple/blue pair are the two outputs from a dual phototransistor, kind of like a switch that gets turned on by receiving IR light instead of pressing it with your finger

There's an IR emitter on the other side, meaning that I have two "receivers" very close to each other that send me a 0 when they're blocked by something, and a 1 otherwise

IT WORKS PERFECTLY

Day 2! Trying out the bigger board now that I have enough natural light to solder stuff comfortably

I need a break either way... What I got from this first day:

- Both motors now have soldered cables and work perfectly

- The circuit to control a single motor with a MOSFET works perfectly, though of course in one direction

- I can use the board's own traces and layout to power it and solder wires to it when I need the values off its sensors

- The bigger board seems to work better, if I didn't somehow damage the smaller board myself

- soldering iron hot ouch