1 answer
Published by

Our school might not have any programmers that will be able to come the workshop therefore we might need some help. Like asked before, are there any other places we can visit at least online. If there is it will be very appreciated as well, it could help all teams so that we can overview of the information and not only receiving it once. Also just as a side note, for schools such as our (a high school) could it be possible to include definitions of the code, I saw that you put up code as a response to the another question and I, with others didn't understand what any of it was for. Please consider our request. 

-LTM Student 
Published on 2019-11-04

2 answers
Published by

I can't seem to get the post to show up. Not sure why.


I wanted to learn about the CRCLib so I wrote a piece of code to output the button values and the Joystick

Values. This is not beautiful, but it is functional.

You need to use the Tools->Serial Monitor to see the output. Arduino debugging is a pain. The output is ugly, scrolling continuously, but that is the way the serial communication works.

USB connect to the 9660, link the manette, run the serial monitor and you are off.

Code is at the bottom



#include <CrcLib.h>
using namespace Crc;
void setup()
    //Not necessary
void loop()
  unsigned char LjoyY = Crc::CrcLib::ReadAnalogChannel(ANALOG::LCHANY);
  unsigned char LjoyX = Crc::CrcLib::ReadAnalogChannel(ANALOG::LCHANX);
  unsigned char RjoyY = Crc::CrcLib::ReadAnalogChannel(ANALOG::RCHANY);
  unsigned char RjoyX = Crc::CrcLib::ReadAnalogChannel(ANALOG::RCHANX);
  bool selectButton = CrcLib::ReadDigitalChannel(BUTTON::SELECT);
  bool startButton = CrcLib::ReadDigitalChannel(BUTTON::START);
  bool L1Button = CrcLib::ReadDigitalChannel(BUTTON::L1);
  bool L2Button = CrcLib::ReadDigitalChannel(BUTTON::L2);
  bool L3Button = CrcLib::ReadDigitalChannel(BUTTON::L3);
  bool R1Button = CrcLib::ReadDigitalChannel(BUTTON::R1);
  bool R2Button = CrcLib::ReadDigitalChannel(BUTTON::R2);
  bool R3Button = CrcLib::ReadDigitalChannel(BUTTON::R3);
  bool upButton = CrcLib::ReadDigitalChannel(BUTTON::UP);
  bool rightButton = CrcLib::ReadDigitalChannel(BUTTON::RIGHT);
  bool downButton = CrcLib::ReadDigitalChannel(BUTTON::DOWN);
  bool leftButton = CrcLib::ReadDigitalChannel(BUTTON::LEFT);
  bool greenButton = CrcLib::ReadDigitalChannel(BUTTON::GREENONE);
  bool redButton = CrcLib::ReadDigitalChannel(BUTTON::REDTWO);
  bool blueButton = CrcLib::ReadDigitalChannel(BUTTON::BLUETHREE);
  bool pinkButton = CrcLib::ReadDigitalChannel(BUTTON::PINKFOUR);
   Serial.print(" L2-");Serial.print(L2Button); 
   Serial.print(" R2-");Serial.print(R2Button); 
   Serial.print(" L1-");Serial.print(L1Button); 
   Serial.print(" R1-");Serial.print(R1Button);
   Serial.print(" L3-");Serial.print(L3Button);  //no idea what button this is 
   Serial.print(" R3-");Serial.print(R3Button);  //no idea what button this is 
   Serial.print(" SEL-");Serial.print(selectButton); 
   Serial.print(" STAR-");Serial.print(startButton); 
   Serial.print(" up-");Serial.print(upButton); 
   Serial.print(" down-");Serial.print(downButton);
   Serial.print(" right-");Serial.print(rightButton); 
   Serial.print(" left-");Serial.print(leftButton);
   Serial.print(" G1-");Serial.print(greenButton); 
   Serial.print(" Re2-");Serial.print(redButton);
   Serial.print(" B3-");Serial.print(blueButton); 
   Serial.print(" P4-");Serial.print(pinkButton);
   Serial.print(" LJoy(");Serial.print(LjoyX); Serial.print(",");Serial.print(LjoyY); Serial.print(")");
   Serial.print(" RJoy(");Serial.print(RjoyX); Serial.print(",");Serial.print(RjoyY); Serial.print(")");

Problem was the screenshot I was trying to include. Maybe I exceeded a maximum post size?


Please note that the serial communication rate is bumped to 19200 baud instead of the default 9600. You need to change the rate on the serial monitor to match or you will get output that looks like is is written in Cyrillic.

Published on 2019-11-09

0 answer
Published by

All the code and documentation for CrcLib (our Arduino library) can be found here!

Published on 2019-10-29