Jump to content
Sign in to follow this  
crumbe

Weird Problem...what Am I Doing Wrong?

Recommended Posts

TCSCOUT and I have been working on the IR remote array.....I am trying to run his code in the simulator and we are getting two different things.....he takes my code and it works right I take it and I get opposite outputs

 

main:
setfreq m4 ‘ setfreq to 4MHz
if pin2 = 1 and pin3 = 0 and pin4 = 0 then 'PIN 2 = ARRAY ON SIGNAL FROM BF BOARD
Goto time15sec
end if
if pin2 = 1 and pin3 = 1 and pin4 = 0 then 'PIN 3 = S2
Goto time30sec
end if
if pin2 = 1 and pin3 = 1 and pin4 = 1 then 'PIN 4 = S1
Goto time1min
end if
if pin2 = 1 and pin3 = 0 and pin4 = 1 then '15SEC = S1 OFF & S2 OFF
Goto time3min
end if                                     '30SEC = S2  ON & S1 OFF
Goto main
                                           '1MIN  = S1  ON & S2 ON
time15sec:
for b0 = 1 to 10                           '3MIN  = S2 OFF & S1 ON
infraout 1,0
next b0                 'Design is: Bigfoot Array on voltage sends a signal to the Transmitter Picaxe
high 0                  'to start the remote array at the preset time set by Dip Switches S1 & S2.
pause 15000             'The signal starts the remote array, using the local array as the IR signal
low 0                   'then turns on the local array to full power until it times out at the settings
pause 5000              'per the local Transmitter Dip Switches S1 & S2.
goto main               'Then the Picaxe Remote Array will time out and shut down on it's own and
time30sec:              'the Picaxe Transmitter will shut down the Local Array and then Pause to
for b0 = 1 to 10        'give the Bigfoot Board time to shut off the Array start signal and go to
infraout 1,1            'timing between video's. The local Picaxe Transmitter will then go to the
next b0                 'main program and wait for the next Array Signal from the BF Board.
high 0
pause 30000
low 0
pause 5000
goto main
time1min:
for b0 = 1 to 10
infraout 1,2
next b0
high 0
pause 60000
low 0
pause 5000
goto main
time3min:
for b0 = 1 to 10
infraout 1,3
next b0
for b1 = 1 to 3 ‘ 3 loops
high 0
pause 60000
next b1
low 0
pause 5000
goto main

 

 

 

When I run the code.....I get output one pulsing 10 times for the infraout and then output 0 goes high for the duration of seconds in the code.....

 

When he runs it...he gets output 0 pulsing and then going high......which that is the way it is supposed to work....

 

 

The only difference is I have Software 5.2.2 which is the latest download....

 

and he has 5.2.0

 

any of you experts got an idea...must be the software difference??

 

 

When I change the code to

 

infraout 0,0 or what ever but replace the 1 in the infraout to 0 it works correctly...but the book says picaxe to picaxe must be 1...and the first number isnt supposed to be an output in the infraout command...it only designates the type of remote...ie I believe 1 is TV....

 

So infraout 1,0 would be TV remote and code out of 0

 

 

Share this post


Link to post
Share on other sites
 

I have 5.2.2 and I'm getting the same as you...but it works correctly on a breadboard. I bet if you search the Picaxe forum it has been brought before...if not...raise heck about it lol..

Share this post


Link to post
Share on other sites
 

Thanks 212......so its just the software......

 

Im will check it out on the forum!!

 

 

I thought I was going crazy......well....crazier anyway!!

 

Share this post


Link to post
Share on other sites
 

Checked the forums but didnt see anything....Im waiting on my registration email....taking a long time to send it.

Share this post


Link to post
Share on other sites
 

I think I will keep Version 5.2.0 for a while. It has to be in the software because the Code is cut and pasted. Unless there is a setting in the software we are missing?

Share this post


Link to post
Share on other sites
 

I would definitely keep it.....If I could find a place to download 5.2.0 I would do it...but I have not found one yet.

 

Maybe it will come on the CD when I get the starter kit

Share this post


Link to post
Share on other sites
 

I really like the new version, even though it must have a few bugs in it. I think I have the old version file saved, but on dial-up it would take a month of Sundays to send it to you. Maybe someone else has it, if not, I might put it on a CD for you.

Share this post


Link to post
Share on other sites
 

This is the what comes up when I click on the about Picaxe version that I have.

 

 

post-5460-1237396139_thumb.jpg

 

I will have to look at my CD to see what it is. I downloaded it before I got the Kit so I am not sure if it is off the CD or the Internet?

 

I just checked my disk, it is Version 5.1.6. That would be even older, correct? How would you send the program/software via internet?

Edited by TCSCOUT

Share this post


Link to post
Share on other sites
 

They had a patch to change the version to the one you have, I have that too.

 

Try this though...insert the disk, and when it auto-plays, just close it. Then go to my computer, click copy on the disk and paste it into a folder. I let it start going, but stopped it before it finished...600mhz computer...

 

You should be able to email the file you pasted there...I think .

Share this post


Link to post
Share on other sites
 

Its to big....unless you have a FTP server......the program is around 35meg....there may be a website you could host it for awhile but I dont think there would be an easy way.

 

I still have not rcvd my activation email from the picaxe forum

Edited by crumbe

Share this post


Link to post
Share on other sites
 

BTW,

 

TCSCOUT....

 

If I get on the forum.....im sure they will want a copy of the code....do you mind if I post the code there???

Share this post


Link to post
Share on other sites
 

You might search google for bas805.exe if you still want to try the old version???

Share this post


Link to post
Share on other sites
 
BTW,

 

TCSCOUT....

 

If I get on the forum.....im sure they will want a copy of the code....do you mind if I post the code there???

 

 

No I don't mind. I posted both the transmit and receive codes on here in case anyone wanted to use all or part of it anyway. No problem.

Share this post


Link to post
Share on other sites
 

I guess since I know that there is a bug....it wont make much difference. I was just having a problem with it...because I thought I had all the pins and outputs figured out...but nothing was making sense when I ran the program...now that I know, I can probably sleep at night again?? LOL!!!

 

I am still going to see if I can find out something on the forum about it.

 

Thanks

Share this post


Link to post
Share on other sites
 

Got an answer from the picaxe forum

 

 

Welcome to the PICAXE forum.

 

I tested the code on the 5.2.2 simulator and it does appear that the device code for INFRAOUT is being simulated as if it is a pin number for the 08M. Whatever device code is specified, that numbered pin is blipped on INFRAOUT execution. We will investigate that further and apologies for the inconvenience.

 

From testing it looks like "INFRAOUT 1,x" will always return pin 1 to what level it was if an output so the best workround for now is perhaps to try and ignore the erroneous pulsing on pin 1. If using pin 1 as an input, place an extra "INPUT 1" after the INFRAOUT.

 

Alternatively, you can use "INFRAOUT 7,x" which will avoid the pulsing being seen, but don't forget to change that back to "INFRAOUT 1,x" for running on real hardware.

Share this post


Link to post
Share on other sites
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×