Go to Post Practice. Don't leave home without it. - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2016, 21:39
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MRT)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 152
The Doctor is on a distinguished road
REV Digit Board library

I thought that now that Github is back up, I'd upload my library for driving the REV Robotics Digit Board MXP upgrade. I tested it tonight, and it can display strings and decimals optimized for battery voltage. It's by no means finalized.

https://github.com/red-green/REVDigitBoard

It was mostly based off the example code from here: http://www.chiefdelphi.com/forums/sh...d.php?t=142054

Functions implemented:

Code:
REVDigitBoard() : constructor
void display(String str) : displays the first four characters of the string (only alpha (converted to uppercase), numbers, and spaces)
void display(double batt) : displays a decimal number (like battery voltage) in the form of 12.34 (ten-one-decimal-tenth-hundredth)
void clear() : clears the display
boolean getButtonA() : button A on the board
boolean getButtonB() : button B on the board
double getPot() : potentiometer value
Example:

Code:
REVDigitBoard disp = new REVDigitBoard();
disp.clear();
disp.display("3216");
// run this repetitively to get voltage readout, assuming pdp is a PowerDistributionPanel object
disp.display(pdp.getVoltage());
I can't figure out decimal points yet, but I'll work on it. Also better documentation is coming here and on Github (assuming it's staying up).
__________________
Robots + Python + pentesting == me;
Blog ~ GitHub ~ Keybase
If you have a pressing issue to discuss with me, kik me at slush.puddles since I don't check CD very often.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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