Posts

Showing posts from February, 2015

Energia: Code on a Timer with Tiva / Stellaris Launchpads

Image
Do you wish you could smoothly fade LEDs without having to code that into the main loop of your program?  Do you wish you could sample sensors or input ports an a regular basis while doing other activities in the main part of your Energia program?  Are you looking for simple ways of creating periodic activities without having to worry about timing loops or how long other processing takes in your loop() function?  If so, then you want to use a timer interrupts! This post describes how to run time based code in a Tiva/Stellaris Launchpad with 1ms precision. The same code runs on the MSP430 Launchpad with 2ms precision. Your function will be invoked at the interval you register without having to integrate any code in your run loop. The timer is in github along with a simple blinking light demo program. Usage AnyMsTimer calls a function()  on regular intervals independent of work you are doing in the the loop() function or the functions it calls. Register...

Web Integration and BDD testing with Selenium, Specflow and MSTest

I occasionally participate in a workshop the LitheSpeed folks where we teach Test First Development using standard unit tests and Business Driven Development using Gherkin.  C# and Java developers participate in a mixed class. The first set of labs involves building a library first using developer style unit tests. The second set of labs involves building a library using BDD techniques.  The class wraps up with building a BDD style set of tests against an existing web site. I've created a small shell project on GitHub that contains both a basic Selenium unit test and a basic Specflow driven BDD style Selenium test. This makes it easy to start testing without the overhead of creating a new VS solution.  I built this project in VS2013 which has good NuGet, Specflow and Selenium plugin and Nuget support. The project uses NuGet Package Restore  to pull down the necessary dependencies in an almost Maven like fashion . The Selenium Web Testing development team co...