Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:40 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : cmm2 wii controller classic - fault

Author Message
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 471
Posted: 07:51pm 26 Apr 2024
Copy link to clipboard 
Print this post


Hello @peter and all the other cmm2 experts,

I'm new to the cmm2. I am using Peter's V2 G1.5 board.
My second hand wii classic controllers have finally arrived and I have tested them on the cmm2. I wrote the following code:

controller classic open 3,dada

do
 'cls
 circle classic(Lx)+10, (classic(Ly)*-1+256)+10, 10,,, 0, RGB(255,255,255)
 circle classic(Rx)+10, (classic(Ry)*-1+256)+10, 10,,, 0, RGB(127,196,127)
loop

END

sub dada
  print classic(b)
  print classic(Lx), print classic(Ly)
  print classic(Rx), print classic(Ry)
  print classic(L), print classic(R)
  print hex$(classic(T))
end sub

Now the output of the print command shows an extra 0, which I don't understand! The HEX value also seems to be different from the one given in the manual for this type of controller (A4200101 vs 4200101).

> run                                                                            
2048
128     0 128
128     0 128
0       0 0
A4200101
1
128     0 128
128     0 128
0       0 248
A4200101
16
128     0 128
128     0 128
248     0 0
A4200101

>

Then I noticed another flaw in the hardware design. You need a tool to get the plugs out of the sockets ;-)




And I can only get the first controller (3) to work.

If I plug in a 2 (controller classic open 2,dada), I get this message:
Error in line 1: Classic not connected

And with a 1 ((controller classic open 1,dada)) I get this error message:
Error in line 5: Not open

Is this because of the Beta FW V5.07.02b11?

Best regards
Matthias
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 08:38pm 26 Apr 2024
Copy link to clipboard 
Print this post

The 0 is because you try to PRINT the value of a variable called print!

E.g.
print classic(Lx), print classic(Ly)

I think you need to remove the 2nd print or change the , to :

John
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 471
Posted: 08:47pm 26 Apr 2024
Copy link to clipboard 
Print this post

Head slap
Thanks John, I had tomatoes on my eyes.

But the other questions still remain ...
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:13pm 26 Apr 2024
Copy link to clipboard 
Print this post

Hi @homa,

My specialist subject .

  homa said  Now the output of the print command shows an extra 0, which I don't understand! The HEX value also seems to be different from the one given in the manual for this type of controller (A4200101 vs 4200101).


It's a typo in the manual which I've brought up before. The correct code is &hA4200101 (and &hA4200000 for a Nunchuck).

  homa said  And I can only get the first controller (3) to work.

If I plug in a 2 (controller classic open 2,dada), I get this message:
Error in line 1: Classic not connected

And with a 1 ((controller classic open 1,dada)) I get this error message:
Error in line 5: Not open


For the two port design the left-hand port is connected to I2C channel 3 and the right-hand one to I2C channel 1. Only the CMM2 Deluxe has a port connected to channel 2.

I believe your mistake is not providing the second parameter in all the calls to the CLASSIC(funct [, channel]) function, if you don't provide a second parameter then it assumes channel 3.

Best wishes,

Tom
Edited 2024-04-27 08:25 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 471
Posted: 09:49am 27 Apr 2024
Copy link to clipboard 
Print this post

It's been a tough week,
and yesterday was definitely too late.

thank you tom!

matthias
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025