Step 5: Design the form in Visual Basic

If you are unfamiliar with VB.Net then read this Instructable http://www.instructables.com/id/Control-real-world-devices-with-your-PC/ which describes creating a VB program in more detail.

After creating a new vb.net project the first step is to create a form. This form has a picture box, 4 labels, a text box and a rich text box. It also has a timer (not shown) which needs to be dropped on the form as well. The picture box is next to label1 and can be any size. The properties of all these objects are defined in the code on the next page.
I'm trying to do this with VB 2010 Express, and it seems like the &quot;Form1_Load&quot; section is never being executed (and, as a result, nothing else is either). Has anyone else had/conquered this problem?<br><br>If I create a button that launches the &quot;Form1_Load&quot; module, this program works just fine. I am guessing that something has changed with the nomenclature of events that are supposed to happen on load? I do not have very much experience with VB so maybe I am missing something very silly.
Sorry about this - when I wrote this in vb2008 I was thinking that one day it would become obsolete. I didn't think it would happen this fast! Many versions of basic are not backwards compatible (eg vb6 to .net). <br> <br>I wonder if you could start with a brand new project in 2010, create a form, compile that and see if it at least loads the form automatically. If that works, then copy things one bit at a time into the new program. Maybe create the buttons from within the new program and then copy the code for that button. So you are creating all the objects like buttons, text boxes in vb2010 and hopefully they will all tie together.
I think it has to do with the &quot;handles&quot; section of the function header. There is probably a handily named construct like &quot;Handles Form1.Load&quot; that I just needed to find and put on the end there. (Haha, I just googled it, and it appears that my guess was exactly right!) <br><br>When I gave Form_Load a button-click trigger, everything ran perfectly. I cranked up the refresh rate a little bit (although I noticed my setup did not like anything much faster than 2 seconds) and now everything is working perfectly. Thank you!
So why is there two LM35s on this circit. is it to take an average?
One LM35 might be recording the outside temperature and one recording the inside temperature. The main reason is to show that the picaxe has more than one A to D converter.
Oh thanks. I really like this circuit. I saw it today first and all ready have the parts I will need in my cart. I never thought of the two LM35 for that action. Then again, thanks for the quick response.
Glad to help. If you have any problems either post here or over in the picaxe forum http://www.picaxeforum.co.uk/forumdisplay.php?f=2
Good job! I'm looking for circuits like this. I need to measure two different temperatures to calculate relative humidity and log this on a computer. There are R.H. sensors that could do this, but over 95% they don't work fine. The picaxe microcontrollers are very interesting and, since they are programmable in BASIC, easy to use. This instructable will help me a lot, thanks!
I'am new to breadboards, could the author of this datalogging stuf send me a more detailed way how to connect the different compenents into the bread board? I couldn't rebuild it from the picture...
If you look at the breadboard in the photo, start from the middle. The 5 holes going up are all connected to each other. Similarly the 5 holes going down are connected to each other. Then along the top is two rows - these go all the way from one side to each other and are connected. So you get two power supply rails at the top, two power supply rails at the bottom, and then those vertical connections going up and down. See <a rel="nofollow" href="http://en.wikipedia.org/wiki/Breadboard">http://en.wikipedia.org/wiki/Breadboard</a> and the third picture down on the right. (except there is no horizontal connection down the middle like on that board).<br/>Personally I think it is easier to copy it from the schematic than from the photo of the breadboard. Let me know if this helps, cheers, James Moxham<br/>
Alright! I've been looking for something of this genre for some time now. Thanks!
I'm guessing that the PICAXE has some kind of built in logic level converter so that the serial interface works? Nice little instructable, perfect for beginners to electronics!
Yes it does have a level converter, of sorts. The circuit limits the current and actually works with other chip families as well. I've been using the same circuit for over 2 years into a 74HC04 gate with no problems. You could use 1488/1489 or Max232 chips if you want a true robust RS232 connection but this isn't really necessary.
Ah ok. Some serial ports can be quite picky. Out of preference I tend to use Sipex logic level converters rather than Maxim ones. Although of late I have been using a Lantronix XPort to read in data from my microcontroller projects through an ethernet interface, highly recommended!
Woah-- looks complicated.<br/>The first picture = hilarious. ;-)<br/>
Oh, just noticed. If you get wires stuck in bread board you should just be able to take off the tape or sticky pad at the back and use another bit of wire to take out the bits that's stuck

About This Instructable


34 favorites


Bio: Dr James Moxham is a general medical practitioner in Adelaide, Australia. His interests include general family medicine, medical politics, microcontrollers and tending a rose garden ... More »
More by James Moxham: Solar Energy Management Internet of Things Simple mass storage for your microcontroller project
Add instructable to: