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...

Show thread

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

Show thread

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

Show thread

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

Show thread

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

Show thread

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

That's 33.2/40 = 0.83cm

Show thread

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

Show thread

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...

Show thread

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

Show thread

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

Show thread

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

Show thread

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

Show thread

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

Show thread
Show more
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!