On June 20, 2014, I will be presenting on DataBinding for your applications at 2014 AppCamp Tampa.
And here are the completed demo files
-twb
On June 20, 2014, I will be presenting on DataBinding for your applications at 2014 AppCamp Tampa.
And here are the completed demo files
-twb
We live in a house that has four heating and cooling zones in it with a Heat Pump that isn’t exactly cheap to run. The different zones makes the electric bill a little less painful in that we can only heat and cool the rooms we need to. For example at night, we keep our bedroom relatively chilly at 68f while I let my office warm up to 80f. While I’m working, I cool my office to 76f and let our bedroom warm up to 80f.
To enable this heating and cooling we have thermostats in each room and dampers that shut off the airflow to the different zones when we don’t need to heat and cool them. The brains for this is a small embedded controller. Our house was built in the early 90’s and the controller is the original one that came with the house. This means the user interface on this is very dated and setting it requires and engineering degree (we’ll not really but I’m the only that knows how to do it and it’s a major pain in the butt). Also since it is so difficult to set, I’m sure we are wasting considerable energy heating and cooling rooms that we don’t have to and really have no way of monitoring the usage.
In addition the only control we had was at the zone level. That means that to cool down one room we needed to cool down all the rooms in the zone. This was a problem in that my office has a lot of computers and takes more to cool down than my wives office. Her room was cold while my room was just relatively comfortable.
Of the past few months I’ve been building a new controller for this, I created my own board base on STM32F407 with the following features:
I have four Insteon wireless thermostats and have also hardwired a number of DHT22 Temperature Sensors so I could monitor temperatures in rooms without wireless thermostat.
So with all this hardware in place I needed some way to monitor the different room temperatures and determine when to turn on the HVAC system, open and close the dampers and vents. Originally my plan was to just program everything on the primary board, but want to make sure I get the kinks worked out of the system first. After all it gets very hot in the Florida summers and my wife wouldn’t appreciate any bugs in the software that would cause our house to get unbearably warm. So I decided to write the controller software in .NET and have something I can easily update and monitor. I needed a home for this and considered running on a PC on my network, but decided on putting this as an Azure Worker Role.
1) Worker Role talks to the controller board and pulls the temperatures
2) It then compares the temperatures to the setpoints at a room level
3) It then determines which rooms and zones need to be cooled
4) After it figures out what it needs to do, it sends commands back to the controller board to activate the heat pump and open/close dampers and vents.
Programming the System is accomplished with a Windows Phone 8 application. This updates the worker role, which in turn saves the settings to Azure Table storage as JSON.
You can take a live look at my system by going to http://lagovista.cloudapp.net:8095/
Over time I’ll add some additional parts to this post as I evolve my system, but feel free to contact me if you want more information or have questions.
-twb
On May 20, 2014, I’ll be speaking along with Kelvin McDaniel and Nick Randolf to talk getting through the last mile on your application.
Here are the slides from the presentation:
-twbWhen you build your application, don’t ignore the icons and graphics. You may need some specialized graphics or icons for your application but in a lot of cases you just need some simple graphics for a button or similar. You may be tempted to just use the same icon throughout the app with the idea to come back later and add some graphics all at ones. I’ve found it’s better just to take a two-three minute detour to go ahead and find an applicable graphic add it to the app, see how it looks/feels as you use the app and add additional features and potentially replace it if necessary.
One place I’ve found a great source of professional icons is from Syncfusion Metro Studio, what I like about their icons is that they have an app where you can search on icons by category and name. When you find one you like you can customize the color, size and border. They also go really well with a metro application.
-twb
Ok, folks, this is ALWAYS they one the gets me when building a new application (or for that matter doing chores around the house). A couple years ago, I started a weekend project to remodel our bathroom. Originally I was disappointed that one of the fixtures I wanted to install wasn’t available for a week, well it turned out I wasn’t ready for that fixture for about two months. The project was much bigger than I had though of, I only pictured the rough work that needed to be done and didn’t think about any of the detail work or for that matter anything going wrong.
You may have a great idea for an app you want to right, but be realistic. If you have your unity license and setout to create the next Halo or Call of Duty app, well I would ask you to think twice. Does that mean you shouldn’t sit down at your computer, open VS.NET and and start hacking away at something like that? Maybe not, there are a lot of projects I work on that I enter into with the knowledge that I’m not going to ship the app. There are two primary reasons I do this. First off is programming and solving problems is fun, second off and more importantly I consider this type of work “practice”. When I commit to do something for a client that I’m going to get paid for, I don’t expect them to pay me to do “research” I want them to pay me to do “development”. Just as with anything the more you practice the better you get, I just don’t like practicing on software that will go into production, so I try to keep my goals on software I ship realistic while I shoot for the moon on my fun stuff.
-twb
As your creating your masterpiece take care to ensure that you keep your code clean. One ByteMaster’s golden rules of software development is the only code that is guaranteed to not cause you problems in the long run is code that doesn’t exists. What exactly does this mean? use some basic principles, like DRY, Do not Repeat Yourself, refactor your code often, put some thought into your naming conventions, rather than commenting out unused code, just remove it. If you do need to comment it out for some reason, add some comments as to why it’s commented out. Although a personal preference, I try to keep my methods under about 20 lines, sometimes as little as 3-5 line. Pick a standard naming coding convention and keep it consistent across your application. One of my pet-peeves – if you are helping someone on an application, and they use a different naming convention, a you just know that yours is superior *cough* *cough*, swallow your pride and just following the app’s naming convention.
Of course these are just touching on some of the basics, but there is a tendency when creating apps to think of them as something you can just hack together and publish, rather than something you need to put some thought into and engineer them properly. Once you get to the final phase of your project if you don’t keep your code clean, you’ll be spending more time then you want just fighting with stupid stuff, tracking down edge cases and generally not having much fun.
-twb
Fought with this one for about 2 hours…hope this post will help someone not waste their time.
Working in a Windows 8.1 store app, I had a command responses from my quad come to my machine over a USB port that I wanted to behave as a auto-scrolling console.
As lines of text came in, I put them in an ObservableCollection<String> that was associated with the ItemsSource on the ListBox.
Then had the code:
DeviceConsole.UpdateLayout();
DeviceConsole.ScrollIntoView(_receivedItems.Last());
Where _receivedItems was my ObservableCollection<String>.
This didn’t work, after much troubleshooting, I realized that the some of the command responses where duplicated. For example, “OK” was returned when I told it to do something. This appeared many times in the list, so when _receivedItems.Last() returned “OK”, and ScrollIntoView(item) was called with “OK”, it simply looked for a string match for “OK”, not the particular instance of the string that was the last item in the list, and it just picked the first instance in the list and didn’t scroll it into view.
Once I determined what was happening, the fix was obvious. I simply created a class similar to:
public class CommandResponses
{
public int Index {get; set;}
public String Respone {get; set:}
}
And used an instance of this class in my observable collection ObservableCollection<String> used to populated the ListBox. As soon as I did this, DeviceConsole.ScrollIntoView(_receivedItems.Last()); worked like a champ!
This was on a Windows 8.1 store app, but I suspect the same scenarios apply to ListBoxs on other platforms as well
-twb
For our April meeting, we will be controlling our Home-Built robot with a Windows Phone device, this should fun so hang on!
We will be using this Bluetooth Module
And the following USB Serial Port Adapter
1) Power your Bluetooth Module with your Netduino
VCC –> +5V (Netduino)
GND –> GND (Netduino)
2) Connect your BlueTooth module to your FTDI Serial Adapter
FTDI Netduino BlueTooth Module
GND GND
TX RX
RX TX
3) Open up Device Manager, and identify the serial port that is associated with your FTDI adapter, in my case it’s COM16, yours will probably be something like COM4. A good way to identify your adapter is to unplug, then plug it back in. The one that disappears and reappears is probably the one you want to look at.
3) Download and start RealTerm
4) Configure the initial baud rate of 9600 on the “Port” tab, then press “Change” and “Open”
5) Confirm that your port is open and the correct baud rate is set at the bottom of the screen
6) If all that looks good, then we can start to configure our BlueTooth module, commands need to be sent very quickly. The best way to do this is open up Notepad or some other mechanism where you can enter text and then cut and paste it.
a) Open Notepad
b) Type AT
c) Copy those two characters on to the clip board by highlighting them and hit CTRL-C
b) Right mouse click in the terminal area in RealTerm, and click on “Paste to Port”
c) If all goes well you should see OK
7) Once you know you are connected, enter the text AT+NAMEXXXXXX in notepad, where XXXXX is the name how you want to identify the bluetooth device. No CRLF at the end. Then copy those characters and paste them into RealTerm.
8) Then set the PIN by doing the same thing with AT+PINXXXX where XXXX is the 4 digit PIN used to pair with the device. IMPORTANT NOTE: If you use a PIN code like 1234, or 0000 your phone may try to auto-pair with that value. To get it to work successfully in your app you will need to enter a more non-traditional code, and then manually enter the PIN code via BlueTooth settings.
9) Once you have completed your screen should look very similar to the following. Your settings will automatically be saved to the device and you can continue by connecting it to your Netduino.
10) Now you need to connect your BlueTooth module to your Netduino, you can remove the wires from the USB FDTI and connect them to the Netduino. See PDF here for a better view of your Netduino
BlueTooth Module Netduino COM1
RX PIN 1 (TX) - D1
TX PIN 0 (RX) – D0
VCC +5V (from before)
GND GND (from before)
11) Next up is to connect to your BlueTooth device from your Windows Phone 8. You will have to use an actual device, not a simulator. Hopefully you know how to do this, but click on Settings->BlueTooth, make sure it’s turn on, and find the name of your bluetooth module. Make sure you enter a PIN code, if it automatically pairs you may have used a known PIN such as 0000 or 1234, try something different in step #8 above.
12 After you have paired your device, download the following Windows Phone 8 application and make sure you can compile it and run it on your device. Make sure you change the name of the device in MainPage.xaml.cs to match the name of our BlueTooth Device
13) Then download the .cs file that has the code, to insert into your .NET Microframeworks project, the code is very straight forward, just cut and paste the appropriate parts into your application. Also, just populate the code in your project to make the inputs from your phone actually do something.
At this point, your little app should be ready to run!
14) Next download the Windows Phone 8 project.
Enjoy
-twb
In our continuing serious on building an autonomous vehicle, in April we will let you robot start talking to the real world!
On April 15, I’ll be doing a session on demonstrating how to remotely control and talk to your robot from a Windows Phone and Windows Store application by adding a Bluetooth module to you robot. And then setup some very basic protocols to control your robot with a Windows Phone and Windows 8 application.
You'll be able to get the Bluetooth device from Amazon:
To use this Bluetooth module, you'll need to configure it, to do so, you'll need some sort of USB to Serial Port Connector such as:
You can sign up at:
http://www.meetup.com/Tampa-Bay-NET-Microframeworks-Developer-Group/events/173765942/
-twb
You know how it is when you are building your application, you have the key features you need to build to make your app come to life. In a lot of cases these key features are something new and challenging. If you’re like most developers you are motivated by doing something new and
challenging so you start on those parts of the app. Then after you put a little time into it, things start coming together, problems start getting solved.but as you do that, there are a number of small less exciting things that need to be done to complete the app. You know how to do it, or it really doesn’t seem that exciting so you say to yourself, yeah, I know how to do that, once I get the primary functionality in the app working I’ll come back and add in that “forgotten password” feature or that regular expression on the email address feature, or something like that. Sound familiar?
In a lot of cases, you get the primary functionality and think you are ready to ship and then all those little extra boring tasks need to be completed. Hopefully you read my earlier post on making lists, if you do this as you go, once you get to this point you won’t be fooling yourself in thinking, just one more thing and I can submit, you’ll have a relatively complete list of work and should be able to gauge the effort ahead of you. As I also mentioned in that earlier post, sometimes when you come across that sort of thing, you should just shift gears a little and knock out some of the smaller items. It may not seem exciting at the time, but will dramatically shorten your final to-do list. Another thing that I found helpful is to start reusing assets from other projects, ideally this would be in the form of a common library you use among all your mobile projects, but even just the cut-and-paste refactoring method is better than redeveloping the wheel each time. Also where possible if you can use an existing application frameworks they may already have dealt with a considerable number of those boring yet necessary tasks.
Last but not least, just being aware of the fact that as a typical developer you are probably deferring all the “boring” tedious development tasks as you go might be enough to change your behavior and make your last mile go a little quicker.
-twb
No, I don’t mean testing on your emulator. I mean use your app in the real world as a real user would. In software engineering terms this concept is called “Dog-Fooding”.
This is one of my top big tips that I have and is also related to something else I’ve learned about creating apps, if you are just creating an app you aren’t going to be using in your day-to-day activities or a game you wouldn’t enjoy playing, you may want to consider the premise of your app and try to find something that is a better match.
So assuming it’s an app you will indeed use, or a game you enjoy playing, as soon as reasonably possible get it off your development machine and onto your phone or tablet you use on a daily basis and USE THE APP! I can’t stress this enough, once you start using the app, you’ll find little things that don’t really make sense or are obviously broken but you just never come across during development. You’ll have to trust me on this one, but for a fitness app I’m building right now, I’m using it every time I get exercise and it’s really surprising how quickly I’m moving through the last mile.
-twb
As you are building your app, there are many times that you come across something that needs to be done, but seems so easy it’s really a distraction of getting the primary functionality done.
Of course you don’t want to be pulled in too many directions while you’re building a large app, but these “Little/Easy Tasks” can really add up or uncover some other major work you don’t realize that you’ll need to do.
My strategy for dealing with these sorts of things is if they are easy and I think I’ll be able to get done in under 5 minutes, I’ll just go ahead and try to complete. These aren’t things that you know you’ll have do like “Create A Forgot Password Feature”, this is stuff like “Need a clearer icon for XYZ” or “Add validation for emails addresses to sign up screen”. If I know it will take a little while but I still consider it some of the “Easy Stuff” I’ll get to once everything else is done, I put in a list. Of course there are lots of tools out there to help with this, but if you just want to get started, create a simple Misc.txt or Todo.txt as a text file in your solution or project.
Obviously you can get fairly advanced how you compile and organize our lists, but get started, today, I mean right now on the application you are working on. If you come across something easy you want to defer, write it down, you’ll be surprised how quickly this list adds up.
Bonus points for keeping this under revision control with the rest of your source files.
-twb
We have a very exciting event coming this spring for Windows Phone that I’ll share more about in the future. However in preparation for this, I’m
going to be compiling and releasing a set of “Last Mile Tips” to help you release your Windows Phone or Windows Store Apps quicker and easier.
If you’ve ever written any sort of mobile application, you know that it’s pretty easy to get to the 90% mark of being done, right? Isn’t it? That’s the fun part where you get stuff working and the app starts to come alive. During that 90% you come across a number of things that are just easy and will get done relatively quickly so you just skip them and continue on with the fun part of making progress and making your app come alive.
Then what happens? You hit the last 10% and BOOM! Death by a thousand cuts, you spend the next 90% of your time on the project finishing up those “last simple and easy things”. If this has happened to you, welcome to the club, you’re not alone!
I certainly don’t have all the answers here to tame the last mile, but I do have a number of things that have worked. Join me over the next few months as I share my experience as well as things I’m learning as I make a concerted to solve this last mile problem.
As we go forward, if you have any tips or tricks that you use, just add them as a comment and I might just add them as post (giving you credit of course).
Stay tuned, things are about to get exciting!
-twb
Join the Tampa crew as they head down to Sarasota for some much needed attention.
On Saturday January 18th, 2014 for 10AM to 4PM, we’ll be holding a Hackathon and Mashup at the ComCenter Lakewood Ranch (Florida Room).
ComCenter Lakewood Ranch - Florida Room
9040 Town Center Parkway
Lakewood Ranch, FL 34202
It will be a very informal setting and schedule but that doesn’t mean you won’t be in for a treat of some awesome content.
In addition to having a great open environment to get help with the apps you are working on, we’ll have some lightening talks to include things such as Azure Mobile Service, Getting the most out of Nokia Maps in your Windows Phone application as well as other useful information applicable for building Windows Phone and Windows Store applications.
Afterwards, we’ll unwind at the Cock-N-Bull and continue the technology discussion.
Hope to see you there!
-twb
It’s with great honor and pride that I can announce that I have been re-awarded as a Windows Phone Development MVP for my contributions in 2013. After long last, I believe that with all the exciting stuff coming to Windows Phone in the coming year, both hardware and software that 2014 will be the year that folks will start taking Windows Phone seriously. We have a long road ahead of us, but much of laying the foundation is behind us and hopefully we can start seeing some real grown in adoption in 2014.

As 2014 starts, I’ll be competing in AT&T Hackathon out in Las Vegas Jan 4th and 5th. We are doing something really incredible with Windows Phone and Windows 8 that I’ll be really excited to publish after the contest.
-twb
Come join us at the Tampa Microsoft office on October 18 from 9AM to 5PM for a full day Windows Phone Event. The format will be a hackathon with some great prizes such as the latest Nokia phones along with some 15/30 minute tutorials on how to leverage some of the powerful features available on the Microsoft stack to get the most out of your investment of time while developing Windows Phone Apps. These tutorials will include such things:
If you're a veteran Windows or Windows Phone developer or just getting started, you'll be sure to pickup something new and have a fun time doing it.
Please register at: https://tpawp8102013.eventday.com
Tampa Microsoft Office
5426 Bay Center Dr.
Suite 700
Tampa, FL 33609
-twb
Last month NiVek took to the sky in controlled flight (more or less) and was a major milestone in my one and one-half year journey back into microelectronics and flying robots :)
Over the past couple weeks I’ve been focusing on the software side of things and achieved a couple of additional milestones. As of last weekend I was successfully communicating and configuring NiVek through the Windows 8 flight console using WinUSB. This weekend I completed a port of the .NET Microframeworks onto the NiVek hardware.
I need to give credit to the Netduino folks for publishing their source code that helped this process considerably. I created a custom USB stack that works with the driverless WinUSB model that’s available on Windows 8.0 and have my code running on .NET Microframeworks 4.3. At some point, I might organize my code to provide some updates for the Netduino 2 products that are still on .NET MF 4.2.
As a mobile/cloud/client/embedded developer, I see the .NET Microframeworks as an enabler for creating small/cheap smart devices that can easily be customized to work with the cloud. In fact, another project I have on the drawing boards right now is a programmable zone controller for our HVAC system that will be programmable with NETMF.
So what’s next for NiVek? My final task before I have the products frameworks completed is to get the Windows Phone 8 app to a point where it can be used to fly the copter. At that point the goals for V1.0 have been completed.
-twb
http://aka.ms/absbeginnerdevwp8series – videos
http://aka.ms/absbeginnerdevwp8 - source code
http://aka.ms/absbeginnerdevwp8pdf - 470 page pdf of full series
Check out this incredible absolute beginner series with Bob Tabor and the help of the Windows Phone team for Windows Phone 8 with 35 lessons with 11.5 hours of content total. The series does assumes you know c# but have that covered as well over at http://aka.ms/CsharpDevBegin.
Soundboard app
Build a sound board application that plays sounds but also records and saves custom sounds you made!
Around Me
Around Me, a location-based image application that uses Flickr and can set your lock screen!
From my quick review of this material it looks like it’s got some really good nuggets of cool tech!
Enjoy
-twb
After my new years resolution, I’ve brewed up a number of batches of beer (primarily IPA’s) for my kegerator. Most turned out relatively good but as summer arrived in Florida it was a little difficult to keep my wort at around 70 degrees during the fermentation process.
So I ended up investing in a freezer from Lowes for about $200 and added custom controller built from an Electric IMP, Netudino that uploads data to a cool service called Xively.
The freezer will maintain a consistent temperature of 70 +/-1 degree, perfect for fermenting most ales.
Here’s a screen capture from my LagoVista home automation app that shows a live capture at 30 second intervals as to the temperature in my fermenter.
And here’s some pix on the actual controller and unit itself, note the “up-to-code” wiring Someday I might get around to putting some sort of enclosure around this.
This is inside the fermentation chamber. Note the little gray wire, that has a thermistor on the end that provide variable resistor output where we can measure the voltage and determine the temperature.
If you’d like more info as to how to build one of these things yourself, drop me an email at kevinw@slsys.net.
As an added bonus my controller was a few feet away from my HVAC unit in the garage so I added a couple extra thermistors to to monitor the incoming and outgoing temperatures for the cooling unit. The full feed can be viewed here
https://xively.com/develop/XXKkf_vy-StrfD_YGml7
-twb
Starting with this meeting, we will be at the AgileThought, Inc. main office building at Rocky Point. Doors will open at 6PM on July 16th for food/social with the main presentation starting at 6:30 PM. Mark your calendar, moving to the AgileThought office will allow us to reserve the room on a consistent night, so right now we are planning on meeting the 3rd Tuesday of each month at 6:30PM.
In the July membership meeting we will be going through Kevin Wolf's Windows Phone and Windows 8 application he's calling Lago Vista that he wrote to control his house using Netduino, Insteon, whole house audio, Electric IMP technology as well as some IP cameras. We will be digging into the code, and discussing what he learned as he installed, configured and programmed over 30 distinct lights and controllers.
Some of the more interesting aspects that he has automated
- HVAC and Heating/Cooling Zone Controllers
- Voice control of IP cameras through a Windows Phone App
- Control of speakers/audio through out the house and back yard with Netduino
- Pool pump, spa/pool diverter and heater control
- Creating multiple scenes for different activities like taking the dogs out and watching movies
- Control temperature of a freezer to achieve a consistent and optimal temperature for fermenting beer
Hope to see you there!