Coder Social home page Coder Social logo

natesclock's Introduction

Nate's Clock

A bedside clock for my son Nate! This is a simple program which works with an Arduino burned Atmel and a hand full of old counter chips (74L516 and 4024) I had lying around, some 7 segment LEDs, an oxford comma, and a speaker. The Atmel flashed as an Arduino (Duemilanove) is the micro for this 'Alarm Clock'. It shows the time, scrolls 'secret' messages, and plays two different songs through the speaker. You can get the gist of what it does by looking at the state chart below.

state_diagram

Here is a similar depiction using a procedural flow diagram, note how all dotted lines connect back to "forever"

procedural diagram

A video of the "computer" before it went in the case is here: https://www.youtube.com/watch?v=rpshfs3g9n4 . As you can see it was casually constructed using what I had. The display basically takes serial to parallel ripple counters where the output of the counters goes to segments in the 7 segment LEDs. To set a digit or character, you count up to the permutation of digit segments you want turned on. For example if we give the right most segments the value 2 and 4 from the output counter, we just count up to 6 and stop to show the digit "1". One or two digits were done with 74L516 counters, and one or two were done with 4024 counters, and the leftmost digit was simple tied directly to the port pins of the micro. Very slap-shod, if I had it to do again for some kind of professional project, I would do it with all 4024's and have some kind of latch so you wouldn't see the number segments counting up to the correct segment permuatation. For hobby stuff though, doing it like I did makes it glitchy, and glitchy is fun for a casual project.

I'm software oriented and getting better at hw daily, but you can tell from this hand drawn schematic I worked from that I am still on my hw journey:

schematic

I put the whole thing in a custom enclosure using more scavenged parts for specialized look. Hopefully you can reuse some of this, like the digit encoding (how to make an 'a' with 7 segments etc.) in your own projects. Btw: As 7 segments is pretty limited, I hack 'm' and 'w' with 'n' and 'u' (respectively) only with a line over the top. Meh. Also there is some basic code to play a couple songs you might pinch. Help yourself, happy coding.

natesclock's People

Contributors

qcarver avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.