Sorry, I think I asked something “stupie”.
So far Ana’s done all coding for this; I usually do the HW.
I just noticed in an example that I do get to choose the timer myself.
WOW! Very nice if all that needs doing is adding the pins to the CSV.
I can confirm that A13 and A14 (P11, P12) on the debug connector work as expected as GPIOs.
So you can improve your written specs eh?
Cat
PS - Soldering to the other pins will be a pita… I hope you’ll consider improving that with as many test points as you can fit whenever you do another spin.
WOW! Very nice if all that needs doing is adding the pins to the CSV.
Thanks again.
Glad we could help!
You say “Plus any changes made to enable pins will not be merged in the upstream firmware.” I think any changes YOU make could and should make it.
Why not? They wouldn’t break anything.
Sure, but in the mean time please feel free to fork the project and merge in whatever changes you want in your own repo.
I can confirm that A13 and A14 (P11, P12) on the debug connector work as expected as GPIOs.
So you can improve your written specs eh?
Cat
PS - Soldering to the other pins will be a pita… I hope you’ll consider improving that with as many test points as you can fit whenever you do another spin.
We will consider that in the next revision, thanks for the suggestions.
About that… " please feel free to fork the project and merge in whatever changes you want in your own repo":
It’s not that I don’t want to.
But, among other things, kwagyeman said he also did something for the servo code.
So I feel like it’s better to include his changes than whatever I might do (the CSV file only, really).
I think I have a plan; please tell me if you see anything wrong with it
So I need 4 GPIOs and 2 PWMs.
It’s going to be hard to solder straight to microcontroller pins so I can almost avoid it by using pads from existing components.
For the GPIOs I can use 2 from the debug connector and 2 from LEDs (R,G,B,IR) I definitely don’t use IR and please recommend if any color is less meaningfull, in case I disconnect it from LED (I could keep it connected).
For PWM I have P9 and it should be easiest to solder a wire to the corner pin 25 that is TIM2_CH4 or TIM5_CH4 or TIM15_CH2. Which timers are already used? I like 2, it’s fancy, but that’s a good reason for it to be already in use.
I could use the LCD backlight too (disconnect it on LCD board) , it’s connected to Tim2_Ch1 and Tim8_Ch1N.
Please advise if any of these timers are already in use or any of my plan is wrong for some reason.
Timer1 is the only one that’s necessary for the camera. 5 and 4 are available for PWM. Timer 2 is available to. I don’t know about the other timers. We borrow a lot of code from MicroPython that kinda just works so I can’t say exactly what’s in use and not beyond the ones that are obviously used by us. Most likely they are free as the pyboard we are based on tries to provide as many resources as it can for the user.
For LEDs, the bootloader uses the green one, file system access via the comp is red, and blue is the heart beat led for the main.py script. Blue would be the least important.
Anyway, with the LEDs and the debug pins you should have 4 GPIOs. Then the PWM pins can come from P9 and and pin 25.
I think it’s all above, but here it is:
Addding:
P10,PD15
P11,PA13
P12,PA14
P13,PA0
P14,PA1
P15,PA2
P16,PA3
I think this also enables (if needed) PWM on the pins I need; I’m using:
PWM_MOT_A_L = [4, 3, “P9”]
PWM_MOT_B_R = [2, 1, “P6”]
(I was going to use some other PWM until I noticed that (I think) LCD LED can to PWM so I’m using that)
Sorry, this hasn’t been high priority for me. Um, I can do it tonight. I’ll send a PR. Ibrahim’s on a finishing trip so I’ll just make you a firmware drop.
Thank you.
This is great for now but I’m still worried about the future eh.
I’m hesitating what to ask; I don’t want to waste your time, but I do feel there’s no downside to adding the changes to the trunk when Ibrahim is back.
So… is he back?
Are the changes in the trunk?
Thanks again,