Listening Reef

Expansion modules and attachments
Post Reply
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Listening Reef

Post by jsclownfish »

More fun with Arduino :D

Awhile ago I posted my first DIY project that plays sounds and can be triggered from the RA unit http://forum.reefangel.com/viewtopic.php?f=4&t=584. It is fun and cool to show off when guests/kids are over, but I got to thinking it would be really cool if it could listen as well. :geek: So I just tested the EasyVR voice recognition module with the RA and with some help from the folks here with the relay masks it actually works. I'm just figuring out how I want to use it, but it is certainly fun to tell the aquarium what you want to happen. For now it can just turn off/on relays, but I'd like to sync it up with the speech tool to communicate status :ugeek: . Here is a quick video I made tonight once it worked. You can't really hear it well, but you do get audio confirmation at each step like "How can I help you?" or whatever you want. I can post the codes if anyone is interested, but it is just a start. ;)

[youtube]http://www.youtube.com/watch?v=eW6vhY4HfGo[/youtube]
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Listening Reef

Post by rimai »

That is so awesome!!! :)
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Listening Reef

Post by rossbryant1956 »

please post code as you get it done. It is the crazy, neat stuff like this that sets RA so far ahead of it's competitors. I am constantly getting beat up on the forums by the close-minded Apex and other non-controller owners; but as that old song said, "and I just sit there smilin', sitting on that stack of code."

Thx RA community.

Ross
Maryland, USA
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
dmolton
Posts: 182
Joined: Tue Mar 22, 2011 11:08 am

Re: Listening Reef

Post by dmolton »

Seriously Cool!
Amos Poh
Posts: 107
Joined: Sun Jul 22, 2012 4:51 am
Location: Singapore

Re: Listening Reef

Post by Amos Poh »

Cool! i want one too :)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Listening Reef

Post by rimai »

Roberto.
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Listening Reef

Post by jsclownfish »

:lol:
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Listening Reef

Post by lnevo »

Nice!
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Listening Reef

Post by Sacohen »

Very cool. I can see all sorts of possibilities if the voice recognition is good enough.
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Listening Reef

Post by Hibb304 »

That's great.
Image
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Listening Reef

Post by jsclownfish »

I've finally got back to this fun little DIY addon. I've added new functionality like "feed the fish" with the autofeeder and "water change" which is kind of fun. I want to have a simple "default status" and an "all off" to control all the ports at once. I'm using this basic code (thanks Roberto!) now....

Code: Select all

GetVR();

if (vrrelay >0)
{
if (vrtype==0)  // Turn port off
{
    bitClear(ReefAngel.Relay.RelayMaskOn,vrrelay-1);
    bitClear(ReefAngel.Relay.RelayMaskOff,vrrelay-1);
}
else if (vrtype==1)  // Turn port on
{
    bitSet(ReefAngel.Relay.RelayMaskOn,vrrelay-1);
    bitSet(ReefAngel.Relay.RelayMaskOff,vrrelay-1);
} 
else if (vrtype==2)  // Turn port Auto
{
    bitClear(ReefAngel.Relay.RelayMaskOn,vrrelay-1);
    bitSet(ReefAngel.Relay.RelayMaskOff,vrrelay-1);
} 
}
Is there an easier way to turn everything off or set everything to auto status without running through each port and setting them using masks?

Thanks,
Jon
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Listening Reef

Post by rimai »

Try this:

Code: Select all

ReefAngel.Relay.RelayMaskOn=0;
ReefAngel.Relay.RelayMaskOff=255;
Roberto.
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Listening Reef

Post by jsclownfish »

Does that code for resetting the status to all auto settings or all off? (or one each?) I think I remember there was a function in the relay class of ReefAngel.Relay.AllOff that would turn everything off?

Thanks,
Jon
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Listening Reef

Post by rimai »

The code is to set everything back to auto.
You can use the AllOff to turn everything off, or go directly to the relay variable:

Code: Select all

ReefAngel.Relay.RelayData=0;
Roberto.
Post Reply