All times are UTC + 8 hours




Post new topic Reply to topic  [ 167 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next
Author Message
PostPosted: Sep 28th, '11, 21:45 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Outbackozzie wrote:
Is there a 'wait' command? Something that after all the timers are finished, it just waits until it receives an input from the feed lever?


There is a wait, and a sleep, and a pause, and a few others, but I think they put the system into a "do nothing for a bit" mode rather than a "keep an eye out for an interrupt" mode.

Basically, you are asking the wrong person :)

But I think that's what setint does

http://www.picaxe.com/docs/picaxe_manual2.pdf

page 215

but don't look at that link if you spook easily :) its by far the most complex thing I've seen so far in my education.

If anyone following this thread knows anyone else who knows this stuff, can you invite them to drop in and become instant legends :)

You only have to know 3 or 4 facts to become the most knowledgeable person here :)

it's a once in a lifetime opportunity :)

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
    Advertisement
 
PostPosted: Sep 28th, '11, 21:58 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
I dont think the 8 pin chip supports the setint command, but it seems to work ok just to loop the program and keep checking

I'll write it properly and post some code

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 28th, '11, 22:53 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
or not. The axepad software doesnt seem to behave the same way as the windows software in ...

if ... then loops

And my windows system died a few days ago (I was only running it for the PICAXE software.

anyone know how to write in axepad...

if pin1 high then

?

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:15 
Offline
Moderator
Moderator
User avatar

Joined: Jul 18th, '10, 13:09
Posts: 2353
Gender: Male
Are you human?: mostly
Location: Western Australia
Bully if you Manange to design it then your a bloody genius IMO. I'll buy the first one.

What a bout increasing the feed on a linear rate as the fish grow? Probably not worth it I guess

_________________
Science: An attempt to understand the world.
Often contains big words that are unnecessary

Freo system | Spearwood
ImageImage


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:35 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Well as it happens, I'm already a genius, but that has nothing to do with this :)

This stuff is a lot more achievable than I make it out to be. I'm building myself up.

For instance I just worked this out since my last msg.

Code:
Main:
   low 1                           ' sets pin 1 to 0 volts
   low 2                           ' sets pin 2 to 0 volts
   readadc 2, b1               ' reads the voltage from pin 2 and stores it in a variable b1

   if b1 > 0 then high 1    'if the stored value is bigger than nothing, it means I've crossed the wires and I'm send some voltage to pin 2 (this is faking a switch and a fish)
      
pause 500
      low 1
   end if

goto main

end

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:37 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Well as it happens, I'm already a genius, but that has nothing to do with this :)

This stuff is a lot more achievable than I make it out to be. I'm building myself up.

For instance I just worked this out since my last msg.

Code:
Main:
   low 1                           ' sets pin 1 to 0 volts
   low 2                           ' sets pin 2 to 0 volts
   readadc 2, b1               ' reads the voltage from pin 2 and stores it in a variable b1

   if b1 > 0 then high 1    'if the stored value is bigger than nothing, it means I've      crossed the wires and I'm send some voltage to pin 2 (this is faking a switch and a fish)
      
pause 500  'wait for a bit with the voltage set to high on pin 1 so I can see the red light flash
      low 1 ' turn the red light off - the red light would really be the motor
   end if

goto main ' wait for a lever press and a fish again

end

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:38 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
I see everything twice

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:41 
Offline
Bordering on Legend
Bordering on Legend
User avatar

Joined: May 10th, '10, 21:46
Posts: 445
Gender: Male
Are you human?: After midday.
Location: West Australia
I'm not familiar with the particular language but something like the below would work in a lot of PLC's.

wait loop
If pin 15=high (goto feed: else goto wait loop)

100 %101 `Wait loop
101 $A15=T {%102:%100}
102 X1=T `Feed


Top
 Profile  
 
PostPosted: Sep 28th, '11, 23:50 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
freoboy wrote:
Bully if you Manange to design it then your a bloody genius IMO. I'll buy the first one.

What a bout increasing the feed on a linear rate as the fish grow? Probably not worth it I guess



That would be pretty easy to do, but could end in disaster if they didnt grow as per your instructions :)

But some kind of feed increase (and decrease) is an excellent idea.

I figured we would need a variable that stores ...

FeedsPerDay

and another that stores ...

FeedSize (in seconds of motor use or whatever)

so it would be simple enough to adjust + or - feed size or FeedsPerDay. Probably the safest way to do this would be with a button for + and a button for - , but hide them inside a box so you have to use a paper clip to poke them through a small hole or something. This way your kids or your cat cant accidentally double your dose every day :)

I can see cats and kids might like it if the fish get all all lazy and floaty. You can see them so much better when they float :)

Given that its all about your water tests, it would probably be safer to do it manually rather than automatically, but I like the idea, and will work it into the design one way or another.

Thanks for the input.

Keep it coming.

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 29th, '11, 00:02 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Privatteer wrote:
I'm not familiar with the particular language but something like the below would work in a lot of PLC's.

wait loop
If pin 15=high (goto feed: else goto wait loop)

100 %101 `Wait loop
101 $A15=T {%102:%100}
102 X1=T `Feed



is that the english translation? :)

Do you speak chip in some other brand?

If so would you be willing to translate once I have something up and running? It wont be very big or complex because my brain cant hold much, and doesn't work very well. So it shouldn't be that much of a challenge, but it might be nice to offer this in a different format if you know C or anything else so people don't need to rely on only PICAXE, and can use Arduino or whatever.

I'll be your best friend.

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Last edited by BullwinkleII on Sep 29th, '11, 00:05, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sep 29th, '11, 00:02 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Earthbound, can you give me edit privileges so I can fix a few errors, (I cant spell Arduino in previous posts) I understand that msgs should never be deleted, because that makes threads stupid messes, but there are already a few errors that might cause somebody confusion down the track. I'll be good I promise.

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 29th, '11, 00:22 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
Ok so I'm now pretty sure I know everything I need to to at least know where to find the bits I dont know.

I'll start the real code tomorrow and post nightly updates when I change anything.

Please, please, please, chip in if you know this stuff and pick a bit to work on, or fix anything I do wrong.

Also anyone who knows PICAXE might like to chime in with a prediction of what chip we might need to use.

It should be not one of the obsolete ones so it has some life left in it, and I dont think it matters that it might cost 3 dollars more.

I'm guessing anyone taking on this project would rather it worked with ease, required the minimum amount of other components, and perhaps even had a bit of room for expansion. Who knows where this will lead.

so ... chip recommendations anyone?

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 29th, '11, 03:39 
Offline
Xtreme Contributor
Xtreme Contributor

Joined: Apr 29th, '11, 14:40
Posts: 113
Gender: Male
Are you human?: not at 3am >_<
Location: USA, Texas, Dallas
Taking it from a totally different direction in programming terms and K.I.S.S (keeping it simple stupid) :) why not have an auto feeder with a pool style skimmer that will skim off slowly uneaten food and monitor temp vs food amount vs fish count = waste (collected in skimmer) and auto adjust accordingly - I could program the logic have no exp with the hardware side ofthings however


Top
 Profile  
 
PostPosted: Sep 29th, '11, 09:54 
Offline
Seriously, this cant be healthy.
Seriously, this cant be healthy.
User avatar

Joined: Mar 26th, '10, 20:46
Posts: 4136
Location: South Australia
Gender: Male
Are you human?: Yep
Location: South Australia
My feed sinks and I'd loose all my duckweed :)

But that could be a better solution if those things are not an issue

_________________
-

My system

120 THINGS IN 20 YEARS - My blog about my learning adventure

My skills include being able to move slowly forward in time, and if I really concentrate, I can sometimes tell what I'm thinking.


Top
 Profile  
 
PostPosted: Sep 29th, '11, 10:24 
Online
Legend Member
Legend Member

Joined: May 30th, '11, 16:27
Posts: 890
Gender: Male
Are you human?: yes
Location: Baldivis WA
You could make a counter with a decade counter.
Every time the button is pressed on the feeder you can program a pulse out of the PIC to the counters clock pin, making it add one.
Every 24 hours you can send a pulse out to the reset pin to reset counting.
If you want to get really fancy you could use a counter and display decoder in one, such as a 4033 IC, so the number of feeds is displayed on a digital readout.
You could also have two displays, one showing yesterdays total feeds before reset and the one counting feeds today.

You can probably program all of this into your PIC chip, but the parts are cheap enough and really easy to wire.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 167 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group
Portal by phpBB3 Portal © phpBB Türkiye
[ Time : 0.470s | 17 Queries | GZIP : Off ]