orangeglo/PS2PSP

error compiling

davidxgames opened 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, 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

328P https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fpreview.redd.it%2Fbggdd9srui351.png%3Fauto%3Dwebp%26s%3D921ec4b761b0465685a39ff3ee45230ead62f877&f=1&nofb=1&ipt=702da2eba28fe79992f85c9a415ed4808fa3e7f37ff36d3c74e41ace69cc2e02&ipo=images

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!

Bma36 commented

can you share a tutorial on how you used esp32?