Rev Robotics MXP Digit board Java code

Here is or team’s Java code for getting the Rev Robotics Digit board to display text. The code is in the team 1493 GitHub:

https://github.com/FIRSTteam1493/RevRobotics-MXP-DigitBoard/tree/master

The character repository contains the byte binary codes for each character (note that each character takes up two elements in the array). Characters are printed from right to left on the 14-segment displays (so the first character in byte1 will end up in the rightmost display). You store whatever you want to print in byte1, then run i2c.writeBulk(byte1) to write it to the board’s internal RAM and therefore to the displays. Right now the code is set to cycle through all 36 characters, but you can change that to whatever you want.

Cheers!

-1493

Please rename the code file to have the .java extension so there is syntax highlighting.

We are trying out your code but have not had success displaying characters. A question: where did you locate the i2c port number value? I have looked all over and not found that documented. I’m curious how you found it.

I’m working on a library to simplify this… I’ll test it tomorrow and put it up ASAP.

Actually we did get this code to work. Again, my question is how did you determine the i2c port number to use?

Also, whatever function we use to read the pot on the analoginput, we get large values, in the range of 208-224. I was expecting (as documented) to 0 to 5, at least using getvoltage function. Have not used analoginput before so seems I am missing something…

The I2C port number is constant, hex 0x70. The analog input, last i checked, is a value from 0 to 1024 that maps to a value of 0-5v.

The GitHub address isn’t going anywhere. It is saying servers are busy or something. Do you have a direct download link for this?

Github is down right now, be patient. I don’t have the code they posted, but in the mean time, you could try out the library I wrote (soon to Github`d)…

Edit: github seems to be up, see this thread:

http://www.chiefdelphi.com/forums/showthread.php?p=1531242#post1531242

Just in case, here’s a backup: Java code for REV Digit Board for FRC - Pastebin.com

It’s listed on page 25-26 of the HT16K33 datasheet. The address is selectable by connecting the A0/A1/A2 to the AD pin via a resistor through a diode.

Yes, I understand the port number is hex 70. My question is how you determined the value is 70. Did you find this in some documentation, or code or online? I have not been able to find this information and I want to know how one comes by this port number value.