10 Replies Latest reply on Aug 22, 2019 8:32 AM by BigG

    Arduino command

    vasi_timis

      Hey Guys, can you please help me with a projekt of mine. I want to make a digital pin from an arduino Mega to be an output on the minutes 1, 11, 21, 31, 41 and 51. And every hour has another Pin as an output the whole time it's that hour, the pin is on (minutes aren't important). How can I write something like that? Please help me (I'm new in Arduino programming).

      Edit:

      English is not my first language and It's a litle hard to explain what I want. I want to write a command where a Pin is gone be an output at a wanted minute independant from the hour it is right now. My projekt is called Qlocktwo.

        • Re: Arduino command
          colporteur

          It appears you are not only new to Arduino but Element14 also. Your approach will need some improvements if you hope to secure some assistance from the members of this site. Hopefully through an information exchange we can flush out your design.

           

          You want to use a Arduino Mega to produce an output at 1, 11, 21, 31, 41 and 51 minute intervals. Is the output for each minute intervals on the same pin or a separate pin for each interval?

           

          You want to produce an output on another pin the whole time its is that hour. Not sure I understand the requirement here. You want a one pin for each hour, to produce output on that hour?

           

          It would be much easier if you describe what you want to build rather than how to build it. (i.e. I want to build a timer. It has to provide output at these intervals. Outputs for minutes and hours is required.) What you are looking to make may already exist.

           

          Sean

          5 of 5 people found this helpful
          • Re: Arduino command
            BigG

            A good place to work out how to do it, is by looking here (look under the "Time" header): https://www.arduino.cc/reference/en/ 

             

            About your Mega board look here: https://www.arduino.cc/en/Guide/ArduinoMega2560

             

            Then assuming you have opened up the Arduino IDE and run through the various available examples for the Mega, then the next step is to work out what which example to start from. In your case I would suggest just looking at examples found in 01. Basics... Blink, and in 02. Digital... Blink without Delay

             

            Then when ready for more advanced stuff look at different libraries to handle timers. E.g. https://playground.arduino.cc/Code/Metro/

              • Re: Arduino command
                colporteur

                Your post is equivalent to dumping the contents of a heathkit on a table with a schematic and solder iron saying have at her, there is a AM/FM radio when done.

                 

                Google searching "word clock" didn't provide the results I was looking for. I was hoping to find some details on the code. The variants of the human readable word clock project are numerous. Some more accurate than others.

                 

                By way of a summary is the code for this just a lookup of the generate time values to be displayed as text (e.g. 20 =Twenty)? My code skills are not developed to read lines to get an understanding.

                 

                Sean