Jump to content
bulltalk.65

Card full - program end Coding

Recommended Posts

I have been messing with some different video cams and want to ask you good coders if there is a way to end or stop the program cycle if the memory card is filled.

If using some simple math and figuring out how many 30 second vids would fill the card, I think adding a symbol for a counter and adding an "if" statement to end the program once the counter has reached it's number should work shouldn't it?

Just not sure how to go about it.

Any ideas?

Gary???

Jim???

Share this post


Link to post
Share on other sites
 

Hey George,

Yeah, you are on the right track.  At the top where you declare variables, do something like:

symbol TimeToEnd = b1 'Use a BYTE (b1) here if the number is between 0 and 255.  If it's larger, then use a WORD (w1).

                                              'Words can go up to 65535.  This is explained on page 13 of picaxe_manual2

TimeToEnd = 50 'Number of videos to record

 

Then in your code, right after the camera gets turned off do something like this:

b1=b1+1

if b1 >= TimeToEnd Then

b1=0

End

EndIF

Share this post


Link to post
Share on other sites
 
25 minutes ago, ghoot said:

Hey George,

Yeah, you are on the right track.  At the top where you declare variables, do something like:

symbol TimeToEnd = b1 'Use a BYTE (b1) here if the number is between 0 and 255.  If it's larger, then use a WORD (w1).

                                              'Words can go up to 65535.  This is explained on page 13 of picaxe_manual2

TimeToEnd = 50 'Number of videos to record

 

Then in your code, right after the camera gets turned off do something like this:

b1=b1+1

if b1 >= TimeToEnd Then

b1=0

End

EndIF

Hi Gary,

Hey its good to see you in here, hope the move went well and you and your family are enjoying the new place and are all settled in now...;) 

Well very cool on the code, that was what I was thinking but just had not tried it yet and wasn't sure on (what you came up with "TimeToEnd".) setting it as a symbol and saying endvid or a number of vids. So thats perfect and thank you for the help there, I'll give that a try, should work out nicely.

I'm messing with some video cams, didn't want to let the cat out of the bag yet but, have found that some of these cheap little dash cams work excellent for a small vid cam unit, best part is most of them have a good menu of options and take decent HD video but the drawback on some of the better ones is the loop recording cannot be shut off (although some can) and the cmos image sensors are lame at seeing low light so lens' have to be changed/hacked or???

So,  I got to thinking I could just figure in the code the amount of videos that would fill the card (or close to it) and then just kill the cam so it didn't rewrite over any of the previous videos once the card was full. (loop recording)

I am still working on finding a good lens for the ones I am working on but the best part with these is they turn on to record with a power up, 2 wires and thats it, and that makes the hack super simple for anyone to do. The internal batteries are only in them so the video saves to the card on ignition shut down so you can just eliminate the internal and add an 18650 external (or whatever the cam needs for power), some of these run @ 3.3 to 6v and a few that I'm messing with will run on 4 AA's forever and a day. I tried up to 10v so far before it fried one..lol... Some have menu options so the color/picture can be set to black&white which will make it nice for IR once I find a lens that will work good.

Problem with most of them, they have slow startup on ignition turn on, for whatever reason, the Chinese think they have to add some ridiculous splash screen for 2 to 4 seconds before it starts to record but some will come on in under 2 seconds to record.

Thanks Gary, much appreciated.

Geo

 

Share this post


Link to post
Share on other sites
 

We love the new place, but I gotta build a shop.  All I have right now is a little storage building with no power, and it is full of stuff, so I'm really not able to work on any projects right now.  I run an extension cord out there and squeeze in to do some soldering if I need to, but it's a sucky work environment.  Have to roll the lawnmower out just to squeeze in to do orders.  LOL  Mama is on board for building a shop though, so I'm about to get the permits and get started building.  YESSS!!!

Sounds like you have found some pretty good cams there, especially with the great battery life.  Holler if you need anything.

 

Share this post


Link to post
Share on other sites
 
2 hours ago, ghoot said:

We love the new place, but I gotta build a shop.  All I have right now is a little storage building with no power, and it is full of stuff, so I'm really not able to work on any projects right now.  I run an extension cord out there and squeeze in to do some soldering if I need to, but it's a sucky work environment.  Have to roll the lawnmower out just to squeeze in to do orders.  LOL  Mama is on board for building a shop though, so I'm about to get the permits and get started building.  YESSS!!!

Sounds like you have found some pretty good cams there, especially with the great battery life.  Holler if you need anything.

 

Right on, glad to hear it.. I totally get it about having a good work shop/garage, always a need for the man cave and work space, something i'm lacking as well...lol

I for sure will, gonna need some hpwa's soon.... 😉

 

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

×