Just getting around to using my Cerberus now that I have 4.2 on it and it no longer hangs/blue screens and am running into strange analog input issues. I tried looking on the wiki and searching through the forums but did not find anything. It would seem like the definition for the Cerberus board has the analog pins misplaced for the sockets but since the code is not on Codeplex yet I cannot verify that assumption. Per http://wiki.tinyclr.com/index.php?title=FEZ_Cerberus_Developer#Technical_Documentation it seems like there are 3 distinct analog ports and they are all different sets of pins. On the same page it says that analog input is completed in firmware as well.
I have 2 joystick modules connected to my Cerberus. Joystick1 is connected to socket 4 and Joystick2 is connected to socket 3. First off, if I try to read Joystick2’s position I get an InvalidOperationException in Microsoft.SPOT.Hardware.dll. If I continue to play around and I just read Joystick1’s position then when I move along the Y axis then the X position changes!? If I move along the X axis there is no change. To add to the weirdness, if I move Joystick2 along the X axis then Joystick1’s Y position changes?! No change if I move Joystick2 along the Y axis.
I have not tested using socket 2 as a different analog port becuase I need it for serial (U) and would not be able to change it anyways.
Thanks Gus. I am enjoying Memorial Day myself, but was hoping to get some coding in at the same time. I was hoping that someone could tell me I did something wrong or could tell me it is a known issue. I will wait to see what you can find out tomorrow. Thanks.
I tried to connect two Joystick Modules to my Cerberus, as you described. If I use sockets 3 and 4 I get same exception. Any other combination (socket 2&4, 2&3) works.
My Cerberus have latest firmware and I used Gadgeteer 4.2 project in VS 2010 Premium.
Thanks jernejk for verifying that I am not crazy and for getting additional data with the socket combinations. I am unsure if I can switch to socket 6 from socket 2 for the U socket. I think I saw on the wiki that there is only one COM port working on Cerberus. I will try the other one tonight and see if I can free up socket 2 to use 2&3 or 2&4 for the joystick modules.
There are two COM ports available on Cerberus with the latest firmware release. On the Cerberus there are two U sockets. As you are using socket 2, which happens to be COM 2, the other one is in fact COM 3.
As for the issue to which both of you are describing, we are looking into it.
If I have Joystick1 in Socket 4 and Joystick2 in Socket 2:
Joystick1 has one axis that always reads a position of 82 (sometimes changes +/- 2 or 3 with holding that axis full) the other axis works fine
Joystick2 works perfectly
If I have Joystick1 in Socket 3 and Joystick2 in Socket 2:
Joystick1 works perfectly
Joystick2 works perfectly
I still have to figure out why socket 6 does not power up my XBee adapter but socket 2 does. If I can clear that hurdle that I am good to go on Cerberus otherwise I will have to wait for the next SDK to fix the analog ports so I free up socket 2 again for XBee. I will take my meter to it tonight and check out that socket. Any other thoughts on what the problem could be?
Does any A socket on the Cerberus support analog input? I’ve tried all those labled A with an extender module. I’ve tried several pins on sockets 2,3, and 4. Finally I tried my code on the spider and it just worked.
This seems to apply to both analog in and analog out.
The most current firmware would be TinyBooter_4_2_0_1.dfu. This is part of the latest SDK download. The new firmware will require you to reflash the board with the TinyBooter.dfu file and then deploy TinyCLR as you would any other upgrade. Analog was corrected in the new firmware.
Here is the link to the latest 4.2 SDK that includes TinyBooter_4_2_0_1.dfu: http://www.tinyclr.com/forum/topic?id=6927
If you do not have TinyBooter_4_2_0_1.dfu in your current Cerberus directory then you probably do not have the latest SDK.