Open eduardokenj opened 2 years ago
Shouldn't be too much of an issue. I'll see if I can get to it this weekend. I don't think I have anything other than a 328p to test though.
@eduardokenj Can you test this branch and let me know if it works? https://github.com/veroxzik/arduino-psx-controller/tree/feat/328p
Sorry for the delay, but the lib not work in 328p microcontrollers. I got that error on my IDE, when i compile on 328p 8MHz (aka Pro Mini): C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduinopsx.cpp: In member function 'void PSX::init(int, bool, bool)': C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduino_psx.cpp:36:19: error: 'SPR2' was not declared in this scope SPCR |= (1 << SPR2) | (1 << SPR1); // Fosc/32 @8MHz==250KHz ^~~~ C:\Users\eduar\Documents\Arduino\libraries\arduino-psx-controller-feat-328p\src\arduino_psx.cpp:36:19: note: suggested alternative: 'SPR0' SPCR |= (1 << SPR2) | (1 << SPR1); // Fosc/32 @8MHz==250KHz ^~~~ SPR0
And when compile the code okay on 328p 16MHz, i tested in my arduino pro mini and uno, in both situations PS1 and PS2 not work.
Hi I'd like to add support for the joysticks if that's ok?
Hi I'd like to add support for the joysticks if that's ok?
@djsedaw Go for it.
Hi, all going well, one question, do you think the micro has enough pins for 4 d-pad buttons, 4 on the right, start and select, L1 and L2, R1 and R2, L3 and R3 which are the buttons on the 2 joysticks, plus the 4 pins for the spi?
I was looking at the raspberry pi Pico board which has enough pins but only 3 analog pins, which means I would need a ADS1115 to increase the analog pins
Sorry 5 pins for the spi
If possible port the library for another AVR microcontroller (ex: 328p)?