Forum Replies Created
-
AuthorPosts
-
MichaelKeymaster
Instead of passing a function to set the flag, just pass a function that performs the communication. So when you enter VBI, your function gets called and you do the work.
void readSensor() {
// read sensor
}
tv.set_vbi_hook(&readSensor);MichaelKeymasterBasically, generating a video signal consumes almost the entire CPU of the Arduino and requires very precise timing. It’s hard to use something like I2C at the same time you are generating a video signal.
If you look closely at the TVout library, there is the ability to attach a function to run during the vertical blanking interval (VBI). Look at this project where I used a Wii nunchuck (I2C) with TVout. http://nootropicdesign.com/projectlab/2011/03/20/tv-blaster/
It uses my Hackvision controllers library which has a stripped down, simplified I2C implementation that uses less memory. Maybe your sensor will work with simpler I2C implementation.
MichaelKeymasterIt’s not just one line of code. You need to keep track of which wire you expect to be cut next. If you are not experienced with coding, this may be challenging.
I get so many requests for code changes to the clock, that I have now started charging customers for this service. It takes time. I can’t develop software for everyone for free.
http://nootropicdesign.com/store/index.php?main_page=product_info&cPath=5&products_id=33MichaelKeymasterSo you want to defuse the device by disconnecting the wires in this order: 3, 2, 1? Or 1,2,3? You are being very confusing by using the word “after”. Do you mean WIRE_1 THEN WIRE_2 THEN WIRE_3?
When you say WIRE_1 AFTER WIRE_2 AFTER WIRE_3 that means WIRE_3 is first, then WIRE_2, then WIRE_1.
You need to be clear!
MichaelKeymasterI don’t know if English is your first language, but your posts are completely unreadable. This sentence makes absolutely no sense:
so I would like to know what you want to write to be in sequence
If you want help, you need to type complete, coherent sentences. If you are asking other people to stop what they are doing and give you their attention and time, then show some respect by making some effort yourself and describe your problems in clear language. If you won’t take the time to do that, then don’t expect others to take the time to do your project for you.
MichaelKeymasterYes, you can modify the code to defuse the clock with that order of wire cutting. Modify the function called [tt:hrtz0oqd]countdown()[/tt:hrtz0oqd]. This function defines the wires for defuse and detonate. Just write logic to ensure the wires are cut in the order you want.
The Arduino source code for the clock is available on this page: https://nootropicdesign.com/defusableclock/hack.htmlMichaelKeymasterThis is an advanced project because it can be difficult to find the closed caption data. I’m not sure that closed caption data uses the same format in Brazil as it does in the US.
I suggest you carefully follow the procedures in the article
http://nootropicdesign.com/projectlab/2011/03/20/decoding-closed-captioning/Are you able to see the CC data bytes displayed on the screen? They should be flashing bars near the top. Uncomment the call to [tt:3twt510c]displayBitPositions()[/tt:3twt510c] to help you align the values in the array [tt:3twt510c]bpos[/tt:3twt510c] to line up with the data bits. This is tricky, so you need to spend time studying the project article.
MichaelKeymasterThanks so much for that feedback! I’m glad you are having FUN.
MichaelKeymasterI don’t understand what you are asking. What are you trying to do with the Defusable Clock? Program it using an Arduino? If you want to program it, you need a USB to serial adapter or cable. See http://nootropicdesign.com/defusableclock/hack.html
If you want help from others, you really should ask your questions more clearly.MichaelKeymasterThe largest value for an int is 32767, so you need to use a “long”. That is why the counter only goes up to 32 seconds.
MichaelKeymasterHave you looked at the code available here: http://nootropicdesign.com/defusableclock/hack.html
It is not difficult to modify the code. To change the countdown duration, just change the declaration of COUNTDOWN_DURATION.
To change the pins for detonate/defuse, change these lines at the beginning of the function countdown():
// assign random pins
defusePin = random(WIRE_1, (WIRE_4+1));
detPin = defusePin;
while (detPin == defusePin) {
detPin = random(WIRE_1, (WIRE_4+1));
}For no randomness, you could just assign them:
defusePin = WIRE_2;
detPin = WIRE_3;MichaelKeymasterI’m sorry, there’s not much I can do. I don’t know what GPS module you are using, how you wired everything, etc. I did that GPS project years ago, so I can’t guarantee that everything will always work — it is just a project I did. If the hardware you bought from me works, then that’s good. But I have thousands of customers, and am a one man company, so I can’t get involved deeply into everyone’s projects. That’s just the reality.
If you want to post more details with schematics, hardware specs, code etc. then maybe others on this forum can help, but so far you haven’t provided any of that, other than to say “it doesn’t work”. How would you help someone with a complex project if they just said “it doesn’t work”?
You said you were a beginner with Arduino — this is NOT a beginner project. It is complex.
MichaelKeymasterThe code I made available on my project here: https://nootropicdesign.com/projectlab/2011/05/20/overlay-gps-on-video/
Compiles cleanly in Arduino 1.0.4. I don’t know why you are having a compilation problem. Are you using Arduino 1.0.4?
MichaelKeymasteri don’t know what to tell you. I’ve used it successfully. Since I didn’t write these libraries, I can’t support them very well, ya know? I support my hardware. Try a higher speed yet.
-
AuthorPosts