<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MSP430 on Bald Engineer</title><link>https://www.baldengineer.com/category/tutorials/msp430</link><description>Recent content in MSP430 on Bald Engineer</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 05 Apr 2017 15:11:50 +0000</lastBuildDate><atom:link href="https://www.baldengineer.com/category/tutorials/msp430/index.xml" rel="self" type="application/rss+xml"/><item><title>Arduino Data Logger: Serial Monitor Alternatives</title><link>https://www.baldengineer.com/arduino-data-logger-options.html</link><pubDate>Wed, 05 Apr 2017 13:00:56 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=6396</guid><description>The Arduino serial monitor is usable when you want to watch data from an Arduino. However, it does not have a built-in method for saving the data. Here are some ideas if you want to build an Arduino data logger with or without a PC.&#10;Important note on Arduino Data Logger examples With all of these examples, please remember that whenever you open the Arduino’s serial port, the board will reset. So if your log file shows “Initializing SD card…” with a few data lines in between, it is because there is a reset happening.<p><img src="https://www.baldengineer.com/wp-content/uploads/2017/04/arduino-data-logger-options-banner-v2b.jpg" alt="Arduino Data Logger: Serial Monitor Alternatives"/></p></description></item><item><title>AddOhms #15: Pull-Up Resistors (and buttons)</title><link>https://www.baldengineer.com/addohms-15-pull-up-resistors-and-buttons.html</link><pubDate>Mon, 10 Aug 2015 13:00:05 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?post_type=video&amp;p=5293</guid><description>The latest AddOhms looks at why you need a pull-up resistor when using push-buttons. This video goes into what happens when you leave a pin floating, what a floating pin means, and how the pull-up works. You can get more information about the video on the AddOhms Episode page.&#10;Pull-Up Resistors can be a difficult topic to understand. That’s why I made this video.&#10;This tutorial is the 2nd time I’ve made a video on pull-ups. Despite being a single resistor, it can be a difficult topic for new hardware designers to understand. The pull-up video was the first video tutorial I ever made. In fact, the YouTube version uses YouTube’s “stabilization” algorithm, which gives the video a very warped feel.<p><a href="https://www.youtube.com/watch?v=wxjerCHCEMg"><img src="https://i.ytimg.com/vi/wxjerCHCEMg/hqdefault.jpg" alt="AddOhms #15: Pull-Up Resistors (and buttons)"/></a></p><p><iframe src="https://www.youtube-nocookie.com/embed/wxjerCHCEMg" title="AddOhms #15: Pull-Up Resistors (and buttons)" width="560" height="315" loading="lazy" allowfullscreen="allowfullscreen"><a href="https://www.youtube.com/watch?v=wxjerCHCEMg">Watch this video on YouTube</a></iframe></p></description></item><item><title>Blink without delay() explained line-by-line</title><link>https://www.baldengineer.com/blink-without-delay-explained.html</link><pubDate>Wed, 05 Aug 2015 13:00:27 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=5275</guid><description>Making the move to millis()-based code can be daunting. You have to rethink your logic, implement flags, program a state machine — and more importantly, start using millis(). Generally in forums and on IRC people will just point to the “blink without delay” example, hoping the commented code is enough for a new user. It’s not enough.&#10;I have a growing list of millis()-based tasks posted in my millis() cookbook. But sometimes that those examples might be too simple or not close enough to your project’s end target. That got me thinking about different ways to help explain how millis() works. I thought “wow, you need to understand every line of an example” which leads me to: line-by-line.<p><img src="https://www.baldengineer.com/wp-content/uploads/2015/08/lbl-blinkWithoutDelay.png" alt="Blink without delay() explained line-by-line"/></p></description></item><item><title>Microcontroller state machine with enum tutorial</title><link>https://www.baldengineer.com/state-machine-with-enum-tutorial.html</link><pubDate>Wed, 29 Jul 2015 13:00:07 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=5251</guid><description>Flag variables are great, and totally not evil, when you just have two states: ON or OFF. What about when you have multiple states? Is there an option better than creating multiple flag variables?&#10;The C-language has a declaration type just for this purpose. It is called an enumeration, or enum.&#10;Setting up a state machine with enum is a surprisingly simple. Arduino and embedded programmers should use them!&#10;All you need to do is create descriptive tag names, and let the compiler assign them an integer value. Unlike a #define which is just a macro replacement, the compiler treats an enum as your personal variable type.<p><img src="https://www.baldengineer.com/wp-content/uploads/2015/07/state-machines-with-enum-tutorial.jpg" alt="Microcontroller state machine with enum tutorial"/></p></description></item><item><title>Flag variables are not evil (for Microcontrollers)</title><link>https://www.baldengineer.com/flag-variables-are-not-evil-for-microcontrollers.html</link><pubDate>Wed, 15 Jul 2015 13:00:13 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=5206</guid><description>Getting programming questions answered on the internet can be problematic. Programmers love to have opinions, stick to those ideas, and express them to you even when their opinion has nothing to do with your question(s).&#10;Not only am I going to explain how to use flag variables in your code, I am going to encourage their use—which most programmers avoid.&#10;However, this advice comes with two caveats.&#10;This information only applies to limited resource environments like an Arduino, LaunchPad or PIC. Use flag variables very carefully when you do use them. The following flag variable usage examples are Arduino-centric but apply to any microcontroller platform, including the Energia project for TI Launchpads.&gt; Flag variables are a Good Thing(tm) – when used properly<p><img src="https://www.baldengineer.com/wp-content/uploads/2015/07/fun-with-flag-variables.png" alt="Flag variables are not evil (for Microcontrollers)"/></p></description></item><item><title>Pushbutton and Flashing LED tutorial with millis()</title><link>https://www.baldengineer.com/pushbutton-and-flashing-led-tutorial-with-millis.html</link><pubDate>Wed, 06 May 2015 14:00:21 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=4930</guid><description>How to blink (or flash) a LED without delay() and detect button pushes One of the limitations of the delay() function is that nothing else can really be done. This presents a problem when you want to flash a LED while waiting for a pushbutton to be pressed.&#10;Flashing the LED with millis() and using a flag variable to find if the LED should be flashing solves this problem.&#10;Consider this another example to my virtual millis() cookbook.<p><img src="https://www.baldengineer.com/wp-content/uploads/2015/05/pushbutton-and-millis_bb-fixed2.png" alt="Pushbutton and Flashing LED tutorial with millis()"/></p></description></item><item><title>Energia and MSP430: Arduino Alternative</title><link>https://www.baldengineer.com/energia-and-msp430-arduino-alternative.html</link><pubDate>Wed, 22 Apr 2015 14:00:49 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=4885</guid><description>Does Energia stack up as one of the Arduino alternatives? With all the recent noise around Arduino LLC and Arduino SRL, I felt like I needed a break from Arduino. So I decided to come back to a platform I set aside a while ago: TI’s MSP430.&#10;Previously I wrote it off because of the Windows-centric software. In fact, I made my first “review” video based on it. (I’m a Mac / Linux guy.)<p><img src="https://www.baldengineer.com/wp-content/uploads/2015/04/energia-intro-banner.png" alt="Energia and MSP430: Arduino Alternative"/></p></description></item></channel></rss>