well could someone tell me how to make a clock using a flow chart. I know its kinda asking for help, but Ive been reading the manual over atleast 2 times and its still not sinking in, maybe if someone could give me an example then i can build around it.
Will a 1000 second clock be something like that?
main:
label_10: high 0
pause 1000
low 0
goto label_10
well could someone tell me how to make a clock using a flow chart. I know its kinda asking for help, but Ive been reading the manual over atleast 2 times and its still not sinking in, maybe if someone could give me an example then i can build around it.
Will a 1000 second clock be something like that?
main:
label_10: high 0
pause 1000
low 0
goto label_10
That code will almost blink an LED on gpio 0(if that is what they call it). By adding another delay it will.
Code:
main:
label_10: high 0 // turn led on
pause 1000 // wait with led on
low 0 // turn led off
pause 1000 // wait with led off
goto label_10[
I am not sure what PICAXE uses for a comment indicator could be ; instead of // or maybe even REM.
To make a clock you will need to use variables to keep the time in. Wait add time to clock variable, do it again.
so would i need to have it count to decade counter? Im just a bit confused on how to go about making a clock, could you tell me what I actually need to include bearing in mind im a complete BASIC noob
btw how do you change the values in the pause and pin numbers? You must convert to BASIC?
Please take the following as a friendly suggestion. This project requires that you learn to program. If you do not want to learn to program you should think about another project.
so would i need to have it count to decade counter? Im just a bit confused on how to go about making a clock, could you tell me what I actually need to include bearing in mind im a complete BASIC noob
btw how do you change the values in the pause and pin numbers? You must convert to BASIC?
I opened the manual and started to work out some examples for you but changed my mind. I do not want to invest (waste) any time in PICAXE basic. I see no valid reason to work with this ugly language.
If you can afford a programmer for real PICS I and others would be glad to help.
Unless you are willing to switch over to a real PIC I can not help you any further.
There must be a good PICAXE tutorials on the web ?
no, there are no good tutorials . Anyway what programs would you recommend. THe school has a USB into pic (looks like a 1/8 stereo plug). So any ideas?
no, there are no good tutorials . Anyway what programs would you recommend. THe school has a USB into pic (looks like a 1/8 stereo plug). So any ideas?
If you are willing to switch go with Swordfish Basic for a language and the Junebug programmer from the link in my signature. Or a PICkit2 directly from Microchip.
well how would i even go about make a clock which sends an output during desired times ? eg 6pm to 5am. Like i seriously have no idea, even if i knew all the commands how do you actually go about making a clock. And how do you edit the times, and pin numbers on PicAxe? And we have just found out our teacher is retiring end of the school year, so i need to have everything flawless by then.
well how would i even go about make a clock which sends an output during desired times ? eg 6pm to 5am. Like i seriously have no idea, even if i knew all the commands how do you actually go about making a clock. And how do you edit the times, and pin numbers on PicAxe? And we have just found out our teacher is retiring end of the school year, so i need to have everything flawless by then.
i am the only one in the class doing a PIC, so I have absolutely zero knowledge on the subject. My teacher just told me to go on pic axe. So cant you give me a helping hand? I mean its not going to hurt is it. At the moment im just doing stuff like this, but i cant seem to even change the values of the delay, or pins.
main:
label_30: high 0
wait 1
label_42: if pin0=1 then label_49
low 0
goto label_42
1000*60*60*24 = 86400000 right? And how do you do a loop function?
THe hardest bit for me to get my head around is when the client who this is aimed for calibrates it according to there working hours. So would it be possible for them to press a button at say 5pm when there work place closes, and then press another one when it open again, at say 7am. And then the PIC will always arm the alarm the alarm between these times? Or is that to complicated?
think i got how to make a clock. If it starts at 12pm this is what happens
main:
label_10: high 1 (high pulse sent out at 12pm)
pause 518400
low 1 (at 6pm a low pulse is send out)
pause 950400
high 1 (at 7 in morning a high pulse is sent out)
pause 432000
goto label_10 (back to 12pm)
That has nothing whatsoever to do with the problem at hand. The device could squirt hairspray, paint, lemon juice, or whatever and the problem would be the same. The point is that he needs help with the programming.
Besides that, Google must be broken where you are. Hint: it's near the top on the first page of results.
That has nothing whatsoever to do with the problem at hand. The device could squirt hairspray, paint, lemon juice, or whatever and the problem would be the same. The point is that he needs help with the programming.
Besides that, Google must be broken where you are. Hint: it's near the top on the first page of results.
Torben
lol, I was wondering who would snap first. Not that you really snapped or anything, but this person does seem to be responding to post in some strange order without reading the whole thread, then repeating what has already been said or completely off base.