Notifications
Clear all

combining two sketches

8 Posts
2 Users
0 Reactions
556 Views
(@edruger)
Member
Joined: 1 year ago
Posts: 4
Topic starter  

Hello!

I am a coach for a high school ROV (underwater robotics) team.  We are using an Arduino Mega to control the ROV to compete the MATE ROV competition.  We are also building a separate device that will move vertically through a profile of water called the MATE FLOATS challenge.

For the 'Float' device we need to communicate date and time pool side from the float.  We have gotten your RTC code to work to transmit the time and we have gotten the 433MHz transmitter and receiver to also work. Both of these code sets we got from your video tutorials on these topics. Thank you!

What we cannot seem to do - is to combine these two sets of code (Arduino IDE) so that we can transmit the date and time.  Any tips / ideas / insights as to how we might combine the code sets together? 


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

Posted by: @edruger

Hello!

I am a coach for a high school ROV (underwater robotics) team.  We are using an Arduino Mega to control the ROV to compete the MATE ROV competition.  We are also building a separate device that will move vertically through a profile of water called the MATE FLOATS challenge.

For the 'Float' device we need to communicate date and time pool side from the float.  We have gotten your RTC code to work to transmit the time and we have gotten the 433MHz transmitter and receiver to also work. Both of these code sets we got from your video tutorials on these topics. Thank you!

What we cannot seem to do - is to combine these two sets of code (Arduino IDE) so that we can transmit the date and time.  Any tips / ideas / insights as to how we might combine the code sets together? 

It's a competition right? Do the rules allow you to use outside help? Do they allow you to use other people's code? 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@edruger)
Member
Joined: 1 year ago
Posts: 4
Topic starter  

@zander Yes! We just need to document what resources we use.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

@edruger I guess competitions today are different from my days.

BTW, you really #$*&% us old timers when you talk about codes. Code is code is code.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

@edruger Ok, I sent an email to the competition management to verify the rules. Once I get confirmation I will take a look at the two pieces of code you specified and see how/if they can be merged.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

@edruger When you say transmit date and time, do you want the entire tm struct or something less? Also how often do you want to transmit the date/time. Do you need code for both the transmitter and receiver? How is the date/time being used? Will it be displayed?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@edruger)
Member
Joined: 1 year ago
Posts: 4
Topic starter  

@zander Thank you for checking with the MATE ROV competition - we are in the 'Ranger' class.  I really appreciate it! Let me know of you need any additional contact information or need to know more about the FLOAT aspect of the competition. 

For the Float - We need to send (we are using using this) UTC time and our team name to a screen pool side - we are using a this RTC code and have both sets of code working independently.  Currently, we have coded an Arduino to run two small medical pumps using code we modified from this website to add and remove water from a reservoir.  Again, we have this running separately (we want to merge this code too). We hope to change density of the float so that we can get it to move up and down the water column.  We are hoping to send the signal to the pool side screen roughly every second.  Does that make sense?   

Hope I answered your questions!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7334
 

@edruger It makes sense, but here are my off the cuff observations.

1. Adding the RTC code to the 433 mHz transmitter/receiver code is very trivial, you just need to decide on format.

2. Screen? how are you expecting to drive the screen. This could be the other 90% of the project depending on what you want.

3. The water pump sketch has several errors. 

4. Do you really want a button to control the water pump?

5. In the sketch, the pump will always be running, there is no OFF so somebody has to be constantly pressing for a while, then releasing for a while. Give this area some thought, there is more to this and the sketch you mentioned is woefully inadequate and has errors.

6. All the electronics have to be above water, but then the longer wires might cause problems.

7. Coding is generally about 20% of a project, analysis and design at least 50% with testing taking up the rest. I am not convinced you have finished analysis/design yet so picking out code to use seems premature.

What is the deadline?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote