NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » Tempsensor+Clock+Scrolling Message???
January 22, 2011 by SirHobbes3 |
So i've got this idea to incorporate the tempsensor wit the clock and then write a scrolling message on the bottom line, would this work, and any ideas on how to incorporate all the programming toegther? |
---|---|
January 22, 2011 by Rick_S |
I've found that the desire to do something is generally a good driving factor to learn how. With that said, I'll confirm that it is absolutely possible to do what you ask. I might even suggest looking at the temperature program, and the real time clock tutorial. Maybe even go a step farther to say I have seen code in the forums posted for scrolling text on the LCD. Lastly, I would venture a guess that if one were to take pieces from all three, adjust the code a wee bit as needed, that a working project like that could be accomplished. :D PS, I'm not trying to be a smart #ss, just giving you some ideas on how to accomplish your task. Once you have some code that you've put together, if you can't figure out how to get it working to your satisfaction, post the code. Then, if I can help, I'll be more than happy to work with you with your program to get it doing what you want. Otherwise, I'd just be doing your project for you... Rick |
January 26, 2011 by SirHobbes3 |
So, i was wondering, to make this work, (im not saying that anyone else has to go out and write the code yo find out) would we put all the codes into one flash, or would we need to somehow combine all the codes into one, this would make a big code either way. Sir Hobbes3 |
January 26, 2011 by hevans (NerdKits Staff) |
Hi SirHobbes3, I would say the best way to go about it is to start a new project for yourself from scratch and then just copy over the parts that you need to make what you want happen. This way you avoid having alot of code that you don't need in your program, and by putting it together from the beginning you will learn a lot more! Humberto |
January 26, 2011 by n3ueaEMTP |
SirHobbes3, I have to admit that Humberto's suggestion is basicly what I've done for my main project. It has a bits and pieces of virtually every program that came with the initial NerdKits CD. The Traffic Light project, the Tempsensor project, and the dip_arithmetic codes just to name a few. I found the trickiest part was making all the pieces of code work together but that's when I learned the most. I just getting started on branching out into the world beyond my kit and trying to interface a DS1307 RTC via the TWI(I2C) protocol. The best part? When I've gotten stuck, I've asked questions here and the community has been a great help!!! Chris B. |
January 27, 2011 by Rick_S |
Not to Hijack the topic... my apologies in advance... Speaking of RTC chips, Chris, I just got in a couple of sample DS3232SN's from Maxim. I'm still waiting on my SOIC to Dip adapter boards. The DS3232 takes the RTC one step farther in that it has a +/- 2ppm crystal with on chip temperature compensation making it EXTREMELY accurate. It also allows you access to the onboard temperature unit it uses for it's compensation giving you an great RTC with a decent temp reading as well all on one chip. I can't wait to fire it up... Patience Rick... :D Hijack off SirHobbes3, Humberto restated (in a much nicer manner :D) pretty much what I was trying to say. Once you start understanding what the bits and pieces of the code in the examples and tutorials do, you'll see how to piece together a project like what you want. I've often found the best way to learn what a given program does is try to think like the computer. Go line by line, write down any change in a variable, jump to any function, and follow the code. After studying a program for a while the lights will brighten. Also a VERY important step when doing that with a microcontroller is to have the datasheet open and when you get to the portion of the program, for example, that is setting up the ADC for the temperature reading, read that section of the datasheet so you know what the registers are being set to and why. Before you know it, you'll be one of the many here helping out someone else who is just starting. Rick |
January 27, 2011 by SirHobbes3 |
Ok, thanks guys, i'll try and get started on this, post back soon!! Sir Hobbes3 |
January 27, 2011 by SirHobbes3 |
ok, so i've got the stuff put together and all, (will post that soon) and i need to figure out how to create a makefile so i can send the program to the microcon., i need to figure this out. So where would i even start????? The tutorial on the realtime clock notes that you can start from one of the other makefiles in the nerdkits code. |
January 27, 2011 by hevans (NerdKits Staff) |
Hi SirHobbes3, Your best bet is to take a Makefile that already exists like the initialload Makefile and copy it over to the directory with your program in it. Then do a replace all from initialload to whatever it is you named your projects .c file. For example if I made a project called foo, I would copy over the initialload Makefile to the foo directory (where foo.c exists) and then replace-all initialload with foo. Please take a moment to take a look at what changed, and how making that change makes the new Makefile work. Humberto |
January 28, 2011 by SirHobbes3 |
ok, thanks Humberto! i'll try this. |
January 28, 2011 by SirHobbes3 |
ok, so my makefile is good, but i'm working out the chunks in my quote quote, stcc, scroll, temp, clock, combine. So ill have it in the next post |
January 28, 2011 by SirHobbes3 |
I know, my code is probaly pretty long and drawn out, there are porbaly large chunks (sections) that need some work, im just a beginner at this stuff, but it's fun. |
January 28, 2011 by SirHobbes3 |
i may have to reorder some stuff, or combine, note that this is my first attempt. Like a rough draft almost. Also, if my code works, im getting a message like this in command prompt. |
January 29, 2011 by hevans (NerdKits Staff) |
Hi SirHobbes3, I very much suggest you take a step back and try to go a little slower as you move forward. When developing new projects it is always a good idea to get one thing working at a time and build your features up one by one. This lets you separate the problems in your head and solve one at a time, reducing the complexity of your project. In your project I see three completely different main() method. As you remember from the NerdKits Guide the main() method is where your program starts, so giving it three main() methods from three different programs will not work. Humberto |
February 21, 2011 by SirHobbes3 |
ok, i kinda forgot to remember that,sorry for taking sooooooo long to post back, my computer has had probs installing vista sp1, so i fixed that and got sp2 and everything is good. So now back to business, right no, i am going to try and do each thing INDIVIDUALLY, then get them combined and the makefile ready to go, so i'll touch in with you guys this weekend maybe, Saturday the 26? SirHobbes3 |
February 21, 2011 by SirHobbes3 |
that "no" is actually "now" in the phrase :"right now" sorry |
February 26, 2011 by SirHobbes3 |
hey guys im still working on the srolling message, i might have it done today, i'll check back in here soon. SirHobbes3 |
March 05, 2011 by SirHobbes3 |
Ok, hello guys! I have successfully figured out the scrolling message AND tempsensor (which i did when i first got the nerdkits) code!! So i will soon have the realtime clock code. I will begin "combining" them soon................... Sincerely, SirHobbes3 |
March 05, 2011 by SirHobbes3 |
YAY, ok so i've got all the codes working now (YAY!!) and im gonna begin working on combining them sometime soon. I will check back in soon. Sincerely, SirHobbes3 |
March 05, 2011 by Ralphxyz |
Can not wait to see what you have done!! Ralph |
Please log in to post a reply.
Did you know that you can read diagnostic data from some cars with a NerdKit? Learn more...
|