thingswebuilt / osod24_firmware

0 stars 0 forks source link

create pin def config file #21

Open markmellors opened 9 months ago

markmellors commented 9 months ago

it makes sense for all our custom pin definitions to be together in one place

robberwick commented 9 months ago

this can probably wait until we have our custom pcb - until then, our pin config is entirely contained in motor2040.hpp. Once that custom PCB is up and running, I guess we'll create our own facsimile of the Pimoroni supplied one and switch to using that instead.

markmellors commented 9 months ago

sort of. There's the steering servos, the RC receiver and the I2C pins (IMU). certainly not an urgent issue but at least it's something I'm able to address :-)

oh, I just realised almost all the pins are defined in motor2040.hpp, not just the ones they're using for something. that does change things a bit, I guess I could switch to using their pin names instead of pin numbers. Weirdly, the I2C pins (20 & 21) aren't defined there though, which is what triggered me to first start thinking about this. They're not the pico's default I2C pins are they?

robberwick commented 9 months ago

yeah, the lack of i2c pins in that header file is puzzling. surely someone must have wanted to use them before now? anyhow. 20 and 21 aren't the defaults for an i2c bus as such - there are 2 buses, and there's a bunch of pin pairs that can be used for either bus. 20 and 21 just happen to be the ones that are wired up on that board.

robberwick commented 9 months ago

related: https://github.com/pimoroni/pimoroni-pico/issues/889 & https://github.com/pimoroni/pimoroni-pico/pull/890