Go to Post Could you explain this concept of a break from FIRST? Did my wife put you up to this? - Gary Dillard [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 03-01-2016, 19:55
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Controlling Axis camera status LEDs

I recently discovered that it is possible to manually control the LEDs on the Axis network cameras (using SSH and the Linux sysfs LED driver), so I decided to write a simple Java library that would allow me to do this from my robot code (or from a SmartDashboard extension). This could be useful for diagnostics or debugging. I have designed this library to work with the M1013 camera, but it could easily be modified to work with other models. In reality, this is code probably not super useful because it is usually impossible to see the status LEDs due to the ring lights that are usually used with these cameras.

If you want to play around with it anyway, the code is available here.

To use it you need to include the sshj library in your robot code, which is easy if you use GradleRIO (which, by the way, is awesome), but otherwise you will probably be able to include the jars manually. You will also need to enable SSH access on the camera.

The only known limitations are that there is some lag when controlling the LEDs (due to how the commands are executed over SSH), and that if the camera is disconnected a backlog of commands can build up and be executed all at once once the camera is reconnected.

I hope someone finds this useful, but at least it was a way to occupy my time while waiting for kickoff.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
Reply With Quote
  #2   Spotlight this post!  
Unread 04-01-2016, 01:49
nickmcski nickmcski is offline
Registered User
AKA: Nicholas McCurry
FRC #1482 (Grandin Ghosts)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 107
nickmcski has a spectacular aura aboutnickmcski has a spectacular aura aboutnickmcski has a spectacular aura about
Re: Controlling Axis camera status LEDs

What kinds of colors can the light do? Does the camera have an RGB light or are the LED's just the standard colors it uses? Also have you found a way to do lighting effects or are the delays in the camera too sporadic?
Reply With Quote
  #3   Spotlight this post!  
Unread 04-01-2016, 07:49
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Controlling Axis camera status LEDs

The ring consists of two sections (left and right), each with a red and a green LED. They can only be turned on or off (the brightness is not variable), allowing them to appear to be red, green or yellow.

You can make the LEDs blink using the kernel driver, and this functionality is exposed in my library. It is also possible to use the status LEDs as network or SD card access indicators.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
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 09:17.

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