Could someone possibly write a code for a vex edr speaker to play the crab rave song, and make it repeat over and over and over again
I am sure someone could. However, if you are playing it on the Cortex, you won’t have enough memory to come anywhere even remotely close to playing 10 hours of music. If you can get the speaker to work with the V5 brain, I really doubt whether you would have enough memory for that either.
@536Mentor When i ment 10 hour version can it be coded to repeat itself over and over and over again.
Yes, you could as long as the part you were repeating wasn’t too large a file. Also, note that if you are playing this during a competition, you may find other teams being quite annoyed and a referee has the right to tell you to turn it off if they feel that it is taking away from the event.
It should be completely fine to play crab rave during autonomous, which is only 15 seconds and since nobody is driving during that time nobody would be distracted.
Except the referee, who has the most difficult job during that time.
Why is autonomous difficult for refs? Isnt it as simple as keeping track of robot expansion and crossing the center line during auton and then scoring after auton is over? I also have another question as I see your an EP, How do you have your refs score auton as ive seen a few different ways with varying degrees of accuracy/
I highly recommend playing the trumpet fanfare match-starting sound clip if you can. Also, “pew” or “boing” whenever you launch a ball would be pretty solid if you could pull it off.
Please try being a referee yourself. You will then understand.
I’m not a ref or EP, but I’ve helped ref some private practice rounds at home, and keeping track of 4 robots is hard. For sure. But I’m not sure music would distract me that much. It would just be some more white noise, I think.
To bring it back on topic…
How does the programming for that part work? Is it by downloading a file to the brain, or do I have to program it note-by-note in a sort of 8-bit version? Can it do non-beep noises?
@Royal_Freedom Yes, you can download a file to the brain (I’ve forgotten the process since, you’ll probably find it on the robotc blog)
This includes actually playing sound files, so you can listen to John Denver in full on 8-bit quality. You’ll have to do a number on the quality of the sound file if you want the cortex to be able to even download a sound file. The most our team was able to manage was about 15 seconds of Dr. DRE on 8-bit quality, 440 Hz (and probably a few other things I can’t remember)
I actually wrote a bit of code to actually utilize the speaker’s ability to produce beeps at certain pitches, which can be used to play a song. I would have to do some digging to get it, and it’s not particularly user-friendly.
Oh ok, awesome.
I also did some digging and found the tutorial for the old Cortex system, @Masterchief24
I think I want to ask @jpearman about this:
So, I did some searching on VCS (C++ Pro) and found that I can upload a file from the SD card port to the brain. The issue is that the brain doesn’t look like it can do anything with the file or direct it to a device, like the speaker. If I upload an 8bit wav file (which is what the speaker can handle), is there a way to send that file to the speaker on the legacy port? Will it have anything to do with the PWM commands?
Also on a side note: I found something interesting with the speaker on V5. If you plug it into a legacy port (I think I used the last one) while the Brain is on and turn the volume up, it makes engine noises. It actually sounds like your robot has a mini diesel engine. Any idea why or how that works?
The VEX speaker is not supported on the V5 brain.
The cortex had a dedicated port for the speaker that was designed to be able to output sound. The V5 does not have any comparable hardware.
Thanks, Wired Cat’s robotics helped me out alot
would it be legal to use if I could write a program to make it output sound by adjusting voltage output or something by registering it as another sensor type?
Assuming your asking about V5, the answer is a firm no, that is not legal.
The V5 hardware physically does not support any such output mode (and does not drive any sensors in that manner). Thus, in order for you to control voltage output (beyond the obvious on and off states), you would need to modify the V5 electronics, which is explicitly illegal.