Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Rev Robotics MXP Digit board Java code (http://www.chiefdelphi.com/forums/showthread.php?t=142054)

acastagna 01-18-2016 02:56 PM

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/Rev...rd/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

floogulinc 01-19-2016 03:58 PM

Re: Rev Robotics MXP Digit board Java code
 
Please rename the code file to have the .java extension so there is syntax highlighting.

Crossle86 01-25-2016 04:13 PM

Re: Rev Robotics MXP Digit board Java code
 
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.

The Doctor 01-26-2016 09:51 PM

Re: Rev Robotics MXP Digit board Java code
 
I'm working on a library to simplify this... I'll test it tomorrow and put it up ASAP.

Crossle86 01-27-2016 11:07 AM

Re: Rev Robotics MXP Digit board Java code
 
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 Doctor 01-27-2016 04:33 PM

Re: Rev Robotics MXP Digit board Java code
 
Quote:

Originally Posted by Crossle86 (Post 1530925)
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.

RamTech 59 01-27-2016 07:28 PM

Re: Rev Robotics MXP Digit board Java code
 
The GitHub address isn't going anywhere. It is saying servers are busy or something. Do you have a direct download link for this?

The Doctor 01-27-2016 09:17 PM

Re: Rev Robotics MXP Digit board Java code
 
Quote:

Originally Posted by RamTech 59 (Post 1531158)
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/sh...42#post1531242

Just in case, here's a backup: http://pastebin.com/NKBatYgZ

kiettyyyy 01-27-2016 10:01 PM

Re: Rev Robotics MXP Digit board Java code
 
Quote:

Originally Posted by The Doctor (Post 1531077)
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.

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.

Crossle86 01-28-2016 12:05 PM

Re: Rev Robotics MXP Digit board Java code
 
Quote:

Originally Posted by The Doctor (Post 1531077)
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.

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.


All times are GMT -5. The time now is 08:25 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi