FAQFAQ   GalleryGallery   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   Forum RSS Feed   Hacked Gadgets Main Site 

Prototype designer needed for new game
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> New Projects Currently Being Developed
View previous topic :: View next topic  
Author Message
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Fri Oct 26, 2007 10:43 pm    Post subject: Pseudo Reply with quote

Here's some real simple Pseudo Code for the program as I understand it. Anyone correct this if it is inaccurate.

User turns on timer:
1) Check remote for the active team selection until timer is started.

2) Check remote for number of seconds until the timer is started.
3) Display selection on the LCD or with segmented LED display.

User Starts the timer:
4) Begin countdown, checking for pause or stop until timer has reached zero.

User presses pause:
5) Stop timer, check for addition or subtraction of second until timer has been resumed or reset.
6) Check for reset until timer has been restarted.
7) Check for resume until tit is pressed or reset is pressed.

User presses reset:
8) Stop and reset timer.

User presses resume:
9)resume timer countdown

What language will this most likely be coded in?
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address

Turd
HG Ruler


Joined: 18 Aug 2007
Posts: 274
Location: Saskatchewan, Canada

PostPosted: Sat Oct 27, 2007 1:09 am    Post subject: Reply with quote

Thats what I understand it to be, but do you have to be in the pause mode for the add or subtract to be recognized?


eric
Back to top
View user's profile Send private message Visit poster's website
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Sat Oct 27, 2007 10:18 am    Post subject: Reply with quote

Yes it seems addition and subtraction of the seconds can only be done in pause mode.
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Sat Oct 27, 2007 6:34 pm    Post subject: What language? Reply with quote

I need to know what language this is going to be coded in / the optimal language to code it in. As soon as I know one or two languages that can be used I can begin to learn the language and start coding the program.
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Turd
HG Ruler


Joined: 18 Aug 2007
Posts: 274
Location: Saskatchewan, Canada

PostPosted: Sun Oct 28, 2007 12:42 am    Post subject: Reply with quote

I made a working circuit/program using my big three digit display and a PICAXE 18X Very Happy

Heres the code:
Code:
setint %0000010, %00000010

symbol plus1 = pin6
symbol minus1 = pin7
symbol strt = pin2
symbol pr = pin1

main:
do until strt = 1
   readadc 0, b0
   b0 = b0 / 12 min 1
   bintoascii b0,b2,b3,b4
   serout 0, n2400, ("t",b3,b4)
   pause 100
loop

timer:
for b1 = b0 to 0 step -1
   bintoascii b1,b2,b3,b4
   serout 0, n2400, ("t",b3,b4)
   pause 1000
next b1

bzr:
for b1 = 0 to 200
   high 1
   pause 5
   low 1
   pause 5
next b1
goto main

interrupt:
do while pr = 1: loop
pause 200
do while pr = 0
   if plus1 = 1 then: b1 = b1 + 1 max b0: bintoascii b1,b2,b3,b4: serout 0, n2400, ("t",b3,b4): pause 200: endif
   if minus1 = 1 then: b1 = b1 - 1: bintoascii b1,b2,b3,b4: serout 0, n2400, ("t",b3,b4): pause 200: endif
loop
pause 200
setint %0000010, %00000010
return




eric


Last edited by Turd on Tue Oct 30, 2007 10:58 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Sun Oct 28, 2007 12:38 pm    Post subject: Reply with quote

What language is this? Is it ome sort of PIC specific language?
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Turd
HG Ruler


Joined: 18 Aug 2007
Posts: 274
Location: Saskatchewan, Canada

PostPosted: Sun Oct 28, 2007 1:46 pm    Post subject: Reply with quote

It's PICAXE Basic (really easy to use) Very Happy


eric
Back to top
View user's profile Send private message Visit poster's website
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Sun Oct 28, 2007 2:40 pm    Post subject: PICAXE BASIC Reply with quote

Thanks, I'll work up something with some variations for different game modes.
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Turd
HG Ruler


Joined: 18 Aug 2007
Posts: 274
Location: Saskatchewan, Canada

PostPosted: Sun Oct 28, 2007 3:05 pm    Post subject: Re: PICAXE BASIC Reply with quote

precisewitem wrote:
Thanks, I'll work up something with some variations for different game modes.
Cool Cool


I just noticed something, I forgot to add the stuff about teams Embarassed

The easiest thing to do would be to start with team A then after the buzzer goes it switches to team B. Does that sound good?


eric
Back to top
View user's profile Send private message Visit poster's website
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Tue Oct 30, 2007 9:51 am    Post subject: Reply with quote

Can't wait til I get some time to work on this. I need to learn the language before I can code anything.
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
precisewitem
HG Master


Joined: 07 Dec 2006
Posts: 130
Location: NY

PostPosted: Sun Nov 11, 2007 10:36 am    Post subject: Reply with quote

I'm not too fond of languages like this. I hated having to take assembler in college. I've taken three levels of Cobol, VB in a few different settings, Assembler, and CICS classes. I had straight A's except for the one C, which was in Assembler. This Basic language is much better than that of course, but it just strikes me as confusing for whatever reason. Probably because it's directly based off of the hardware PIC, more hardware designation than I'm used to. Cobol has some annoying hardware designations as well.
_________________
"Genius is one per cent inspiration and ninety-nine per cent perspiration. Accordingly, a 'genius' is often merely a talented person who has done all of his or her homework..."

Thomas Edison
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> New Projects Currently Being Developed All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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 vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group