Go to Post So, FIRST is turning into the For the Inspiration of Science and Trains? That makes sense... Not a whole lot of re-branding will be needed.... - dqmot17 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 13-03-2011, 19:37
CNettles11's Avatar
CNettles11 CNettles11 is offline
Registered User
AKA: Chris Nettles
FRC #3502 (Octo-Pi-Rates)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 122
CNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the rough
Play sound file with FRC Control system?

Hi, i know this sounds crazy but, is there any way you could program a sound file into teleop and have it playback through the FRC Control system? this might not be legal but our team is taking our bot around to elementary and middle schools and we want them to hear more than "WHIRRRRRRRR" come from our bot.

Thanks in advance
Chris Nettles
Team 3556, GET SMART
__________________

Reply With Quote
  #2   Spotlight this post!  
Unread 13-03-2011, 22:08
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Play sound file with FRC Control system?

Probably not directly, but using an external device could work.

A quick search on SparkFun, and you can find several serial controlable MP3 player/decoder boards for <$50.
http://www.sparkfun.com/search/resul...&what=products
__________________
Eric Haskins KC9JVH
Reply With Quote
  #3   Spotlight this post!  
Unread 13-03-2011, 22:14
CNettles11's Avatar
CNettles11 CNettles11 is offline
Registered User
AKA: Chris Nettles
FRC #3502 (Octo-Pi-Rates)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 122
CNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the rough
Re: Play sound file with FRC Control system?

and would these have a way of pulling information from the cRIO or would a different communications/control confuguration have to take place alongside our robot radio?
__________________

Reply With Quote
  #4   Spotlight this post!  
Unread 13-03-2011, 23:06
rath358's Avatar
rath358 rath358 is offline
Registered User
AKA: max
FRC #0093 (NEW Apple Corps)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Wisconsin
Posts: 27
rath358 is on a distinguished road
Re: Play sound file with FRC Control system?

It should be possible, but could be a major PITA. Last May, I made a programmable milling play the song from portal, using labview to write gcode to drive one of the motors at varying speeds. If one of your motors seems to have a different pitch at different speeds, you might be able to use that to get the desired result. pm me if you want to see the code.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-03-2011, 23:16
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Play sound file with FRC Control system?

Quote:
Originally Posted by CNettles11 View Post
and would these have a way of pulling information from the cRIO or would a different communications/control confuguration have to take place alongside our robot radio?
The audio would be stored on an SD card attached to another device, controlled by the cRio via GPIOs or serial.

From the MP3 Trigger v2 page:
Description: Created in collaboration with Jamie Robertson, the MP3 Trigger is quite possibly the most versatile, low-cost, low power embedded MP3 Player. The board has 18 external trigger pins that will directly trigger pre-selected MP3 tracks, and a full-duplex serial control port that provides full transport control, remote triggering for up to 256 tracks, and fast real-time volume control. The board plays the MP3 files directly from a FAT16 microSD flash card and supports 192Kbps stereo playback. There is also an on-board navigation switch for local access and playback of all MP3 tracks on the flash card.

Datasheet

NOTE: I have not used this or any similar devices, but it looks like it should work.
__________________
Eric Haskins KC9JVH
Reply With Quote
  #6   Spotlight this post!  
Unread 14-03-2011, 00:57
CNettles11's Avatar
CNettles11 CNettles11 is offline
Registered User
AKA: Chris Nettles
FRC #3502 (Octo-Pi-Rates)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 122
CNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the rough
Re: Play sound file with FRC Control system?

Quote:
Originally Posted by EHaskins View Post
The audio would be stored on an SD card attached to another device, controlled by the cRio via GPIOs or serial.

From the MP3 Trigger v2 page:
Description: Created in collaboration with Jamie Robertson, the MP3 Trigger is quite possibly the most versatile, low-cost, low power embedded MP3 Player. The board has 18 external trigger pins that will directly trigger pre-selected MP3 tracks, and a full-duplex serial control port that provides full transport control, remote triggering for up to 256 tracks, and fast real-time volume control. The board plays the MP3 files directly from a FAT16 microSD flash card and supports 192Kbps stereo playback. There is also an on-board navigation switch for local access and playback of all MP3 tracks on the flash card.

Datasheet

NOTE: I have not used this or any similar devices, but it looks like it should work.
This device looks like the solution, now how to control it through the DSC
__________________

Reply With Quote
  #7   Spotlight this post!  
Unread 14-03-2011, 01:19
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Play sound file with FRC Control system?

Quote:
Originally Posted by CNettles11 View Post
This device looks like the solution, now how to control it through the DSC
The simplest way would be to connect a digital output to one of the trigger pins on the MP3 Trigger device. Setting the digital output to low will cause a corosponding mp3 file to be played. This method can be used to control upto 18 files.

This is documented on page 3 of the datasheet I linked to above.

If you require more control you can also control it via serial, also documented in the datasheet.
__________________
Eric Haskins KC9JVH
Reply With Quote
  #8   Spotlight this post!  
Unread 14-03-2011, 01:28
CNettles11's Avatar
CNettles11 CNettles11 is offline
Registered User
AKA: Chris Nettles
FRC #3502 (Octo-Pi-Rates)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 122
CNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the rough
Re: Play sound file with FRC Control system?

Quote:
Originally Posted by EHaskins View Post
The simplest way would be to connect a digital output to one of the trigger pins on the MP3 Trigger device. Setting the digital output to low will cause a corosponding mp3 file to be played. This method can be used to control upto 18 files.

This is documented on page 3 of the datasheet I linked to above.

If you require more control you can also control it via serial, also documented in the datasheet.
a couple more questions,
1) can you control digital ouputs from the drivers station?
2)Which DIO wires would run to the trigger?
__________________

Reply With Quote
  #9   Spotlight this post!  
Unread 14-03-2011, 01:49
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Play sound file with FRC Control system?

Quote:
Originally Posted by CNettles11 View Post
a couple more questions,
1) can you control digital ouputs from the drivers station?
2)Which DIO wires would run to the trigger?
1) You can. In Java, C++ is very similar. You'll need to find someone else to help if you're using LabView.
Code:
DigitalOutput file0 = new DigitalOutput(1);
Joystick stick = new Joystick(1);
//...

public void teleopPeriodic() {
	//...
	if (stick.getRawButtons(1)){
		file0.set(false);
	}
	else{
		file0.set(true);
	}
	//...
}
}
2) You would connect the signal wire, white, to the pin on the MP3 Trigger device.
__________________
Eric Haskins KC9JVH
Reply With Quote
  #10   Spotlight this post!  
Unread 14-03-2011, 07:51
CNettles11's Avatar
CNettles11 CNettles11 is offline
Registered User
AKA: Chris Nettles
FRC #3502 (Octo-Pi-Rates)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 122
CNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the roughCNettles11 is a jewel in the rough
Re: Play sound file with FRC Control system?

well, i can dissect what i would need to do in labview from the java code you posted, Thanks!
__________________

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 04:12.

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