Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While recording, momentary switch on controller enclosure to create "flag" in Data and flash Lamp LED and enclosure LED for sync #8

Closed
bturep opened this issue May 18, 2019 · 7 comments

Comments

@bturep
Copy link
Collaborator

bturep commented May 18, 2019

This will be used when the lamp is set up and recording and I am moving camera positions.

@bturep bturep changed the title While recording, momentary switch on STM to create "flag" in Data and flash LED for sync While recording, momentary switch on controller enclosure to create "flag" in Data and flash LED for sync May 18, 2019
@bturep bturep changed the title While recording, momentary switch on controller enclosure to create "flag" in Data and flash LED for sync While recording, momentary switch on controller enclosure to create "flag" in Data and flash Lamp LED and enclosure LED for sync May 18, 2019
@bturep
Copy link
Collaborator Author

bturep commented May 21, 2019

Could we also, at the beginning of each recording, have a time date stamp? Something like "hh:mm, dd/mm/yy"? Would this require that the controller always has power to keep an internal clock running? If it is an issue then no worries-- it is very low priority.

@tygamvrelis
Copy link
Owner

tygamvrelis commented May 22, 2019

At the moment, file name is of the form ddmmyyyy_hh_mm_ss.dat, e.g. 13052019_22_12_30.dat. I don't think the raspberry pi keeps time when it's off, so we would need an external clock module if you want this time to be accurate. Otherwise, the time will default to some particular value whenever the raspberry pi is powered on. What do you think?

Also, in my work-in-progress branch, I am currently writing a time stamp alongside each data packet:
image
In plaintext, you can see the time and the status. The time is taken from my laptop. The status is 1 whenever the camera LED is on and is 0 otherwise. This allows you to Ctrl+F for "stat=1" to find all the times when the camera LED is on. Above, you can see a transition in the status, caused by me pressing a button.
After that, you see our acceleration and gyroscope data in binary format, which my text editor is desperately trying to interpret as alphanumeric symbols. I played around with logging this data in plaintext, but I found that the file size blew up quickly...the current method with binary data is 96% smaller.
Part of the reason I want to keep it smaller is that you said you might want to open up the text files and stitch them together. Your text editor probably won't be able to do that if the files are hundreds of megabytes. Fun fact: my text editor was struggling to open even short data logs when I logged the data in plaintext, so the binary logging was in fact necessary for the dev process. 😄

@bturep
Copy link
Collaborator Author

bturep commented May 22, 2019

To your first question, I am open to it-- if it is quick to code, and not too much effort for you, then I think it would be useful (the external clock module)-- and Creatron down the street apparently has a few different options so it is not like I would have to order it in. The reason I think it would be helpful is for when I make multiple recordings, each with their own flags, and I am trying to sort them out come editing day. If it was time stamped to REAL ddmmyyyy_hh_mm_ss, I would simply set my camera to also note time-date.

An alternative would be to make a new .dat file each time the controller is turned off then on again-- (is there a danger of overwriting the previous .dat?) If we do this (maybe this is already what you have programmed) I could just keep track on my own of how many instances I have turned it off and on as I am shooting throughout the day and cross reference with the footage. A bit more of a hassle but totally doable!

Also, would you recommend a program for reading the .dat?

@tygamvrelis
Copy link
Owner

tygamvrelis commented May 23, 2019 via email

@bturep
Copy link
Collaborator Author

bturep commented May 23, 2019

@tygamvrelis
Copy link
Owner

Okay great, we should be able to integrate it via steps like so: https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi?view=all

This was referenced May 23, 2019
@tygamvrelis
Copy link
Owner

Fixed in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants