error compiling
Closed this issue · 16 comments
Thanks for sharing, I have some doubts, I am compiling with arduino ide, but it gives me an error for PS2X_lib.h, my question is where can I get that library?
Hi, you need to install https://github.com/madsci1016/Arduino-PS2X into your arduino library
Thanks for answering, I already installed the library, but I have this error: "DDRE was not declared in this scope". Should I compile with some version of arduino ide?
EDIT: if i compile for arduino mega it compiles without errors.
Yeah you need to make sure you're compiling for the 328PB, which has Port E. I recommend installing the MiniCore hardware package, it makes working with the bare chips much easier :)
You'd select 328PB, internal 8mhz clock
so the mega328pu doesn't work in this project?
thanks for the help installing the MiniCore
Assuming you mean the 328P-PU, that won't work with this code because the P variant doesn't have port E with the extra 4 inputs that the 328PB has. I haven't looked at this code in a while, but you may be able to modify it to get away with using a 328P by removing some features.
PU is a manufacturing code btw, the only real variants I'm aware of are 328, 328P, and 328PB
Yes, I'm using an arduino nano that has ATMEGA328pu, I'll look for a separate MEGA328pb.
It looks like the trigger for the HOME button is the only thing the code uses Port E for. If you're using an arduino nano you can probably change the code to move that to a different port yourself
Parece que el activador del botón INICIO es lo único para lo que el código usa el Puerto E. Si está utilizando un arduino nano, probablemente pueda cambiar el código para moverlo a un puerto diferente usted mismo
I'll try it, I'll post the results later.
EDIT: if I remove the E port, it compiles with no problem.
From what I checked, if I want to use the 328pu I will have to modify all the pins in the code, since the 328pb and the 329pu have a different pinout.
I think there is an error in the following:
#define PS2_DAT 23
#define PS2_CMD 4
#define PS2_SEL 3
#define PS2_CLK 2
pin 23 in the schematic goes to pin 4 of the center ribbon
pin 4 goes to vcc
Sorry if I'm wrong, I'm a noob.
Ah looks like I used Port E for the PS2_DAT, you'll need to change that too. The code was really written for the specific circuit board so some stuff will need to be adjusted to use with a regular arduino board
Ah, parece que usé el puerto E para PS2_DAT, también tendrás que cambiar eso. El código se escribió realmente para la placa de circuito específica, por lo que será necesario ajustar algunas cosas para usarlas con una placa arduino normal.
328 PB
In the end I used an esp32 and it worked fine, you have to modify the PS2X library to make it work on esp32.
That's great, I'm glad you got it working!
can you share a tutorial on how you used esp32?