Jump to content
43oh

spoil9

Members
  • Content Count

    24
  • Joined

  • Last visited

About spoil9

  • Rank
    Member

Profile Information

  • Sparkfun
    GPRS shield
  1. Rob, Thank you for posting all this sample code. Not being a C programmer, I'm still a little confused by it but I'm learning. I have a question though, when watching all the videos I noticed that the servos only rotated 90 degrees, which mine did as well. Is this just the way the way the 430 handles servos or is there something I can change in the code to allow a full 180 degree rotation? Thanks.
  2. Been working on this for the better part of the day but I finally got some working code that I like. I had to do a lot of background research but this page helped me a lot with the code for the switch ISR (Interrupt Service Routine). http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Interrupt_vs_Polling I'm still not 100% understanding of what each line does but I do understand whats going on in the background and another reading from this page would probably help me get to 100%. http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_PushButton So here is my working code. Al
  3. Thank you abecedarian, I'll have to try that sometime as I prefer working with binary at this time rather than hex because it's easier to see what pins are doing what. Although almost all sample code I've seen does it in hex so I'm assuming that is the norm so I'm going to force myself to learn it that way though. As a reminder, when loading new code the previous pins that had LEDS on would flash right before the code finalized. Because I was running 6 LEDs, this caused a voltage drop from my USB so my compiler thought that the launchpad was unplugged and I got an error. If this happens,
  4. OMG, I'm an idiot. This entire time I haven't been putting the pin directions in as a hexformat, so that's why the pins haven't been working. I just tried turning on all the P2 LEDs and they all work. Note. When entering pin directions, it has to be in this format: 0xYY where YY is the hexdecimal. It will not accept it as binary like I thought it would. I know, this sounds stupid to most, but I'm not a programmer, and the documentation I've read never said it had to be converted prior to typing it in code. But at least now I know, and maybe someone else will learn from my mistake.
  5. I I tried a bunch of different things, but lastly I set P2DIR=00111111 so all pins where outputs. I then set P2OUT=00111111 so all pins should be on constantly, but only pins P2. and P2.3 light up LEDS so I'm assuming that somehow my chip got messed up. I'm going to test to see if they work as inputs but I'm assuming they won't. Yep, P2.1 would not work as an input. Either there is something I'm missing or this chip is damaged. I'm limited on time and supplies right now so I'll have to make due with what I got.
  6. Sorry for the delay in responses. Been real sick with the flu the past couple days so I barely got out of bed yet alone thought of this project. I'm going to spend a few hours now working on it again to get three pins worth of LEDs to light in sequence and I'll report what I come up with or what problems I run into.
  7. I could use a little help here figuring this one out. So I'm running this code... and pin 2.0 is working as it should, but pin 2.1 and 2.2 are not. Instead pin 2.3 is acting as pin 2.1 I've tested every other pin and nothing else is turning on LEDs except pins 2.0 and 2.3 How can this be if in my pin setup I made pin 2.3 an input? And no where in my code do I have 2.3 become active.
  8. Got it to load the code for a blinking LED, but I can't get the LED to blink. Again, I'm using the launchpad to program the 430 which is on a breadboard. CCS tells me that the code is loaded. I've tested the LED and know that it works with the supplied voltage at VCC. I've moved the jumper wire to every pin and the only ones that make my LED light are VCC and the RST connection. Disregard all above. I unplugged the launchpad from my USB port and plugged it back in and the LED is blinking now. Guess it just needed a reset. Gonna try the switch code again. Same with the switch sample
  9. I have the code, just having a hardware problem where CCS wont talk to my chip. I know I'm doing something simple and stupid but I'm going to take everything apart tomorrow and start from scratch again to get a fresh perspective. Thank you for the offer though.
  10. Thanks for the code. I'm working on getting an LED to toggle via an external pushbutton using code from TI Wiki. I think the biggest problem I am having is that the chip is not on the launchpad because I don't have the couplers so I'm using the launch pad to program the chip which is on a breadboard. I'll pick up those couplers tomorrow and then I'll be able to put the chip back on the launchpad and use it like I'm suppose to.
  11. bobnova, I'd love to. I'd like to have each group of LEDs on a PWM but I'm not there yet with my C skills. I can't even get a servo to turn or a switch to work right.
  12. Skipping ahead a bit, here is the snippit to turn off the LEDs after the 10hours has elapsed...
  13. I've thought about the light sensor and a clock, but where the tank is located in the condo it may not get enough light to signal day light and if I turn a light on or off in the room I don't want to trip the sensor. This way is still using automation to help with feeding and ensuring the light doesn't stay on for too long yet still gives me the sense that I am interacting with my fish which is important to me. Currently I like to make a cup of coffee or a quick breakfast and sit down after feeding the fish so I can watch them eat. Not only is it calming but allows me to count the fish, check
  14. Still need code to wait for a external button push, and to rotate a servo. I ran some sample code on my 430 that was suppose to just rotate a servo back and forth but all I got was errors so I'm going to take a break and try again tonight. Also need to research use of TimerA so I'm not just using a delay for 10hours while the light is on.
  15. And this is turning on three LEDs that will simulate turning on 3 groups of LEDs in the LED light bar I have over the tank.
×
×
  • Create New...