I have been asked why I began writing this blog. To answer anyone who might want to know, I have decided to write this blog post. I'll just dive in.
1) Writing a blog encourages documentation. I tend to work on things in a scattered manner. Knowing that I will need to post pictures and a summary of the process encourages me to keep my thoughts focused and my records organized. At the very least, I have to finish the project before I forget what I did.
2) Writing a blog helps immortalize documentation. When I hit publish on a blog post, I can (generally speaking) count on Google to put that post out there. If my house catches fire and burns to the ground the next day, all I have to do is go to the library and type in "projectsfromtech.blogspot.com", and all my previous projects are right there. Even if I forget my password, this data will still probably stay out on the inter-webs until long after it has become irrelevant (which isn't that long).
3) Writing a blog helps increase documentation accessibility. Obviously, if I write down my projects on a notepad and tack it to my wall, not too many people will ever see it. What I am doing may be completely useless to some people. However, it may be invaluable to others. When I begin a project, the first thing I do is Google the problem and see if anyone has done it before. My blog just adds to the list of things that have been done. Sure, there is a post on how to run stepper motor x140 out there. But if I want to run a x143 wouldn't a post on running an x143 be helpful too?
"But if everyone posts what they are doing, the internet will become so clogged that no one will be able to find anything!" Well there again, thank our friends at Google. It isn't easy to get on the first list of hits for a Google search. All we can hope for is that the articles that will help you are there, and the junk ones are off in the weeds.
Technology is advancing faster than ever before. The best technology today is the discarded second of tomorrow. Universities release exciting new papers that are outdated before people have time to read them. Individual men have always been great innovators, but this boom has come about from the share of information. The internet is a fundamental part of the way life is lived and problems are solved. Open source and open hardware projects are a major part of the internet. Something that one man does because it is cool becomes something that another man uses to solve a problem. The internet is a dark and scary place, but no one can deny its profound impact on technology.
So go blog away about your projects. I plan to as long as I can. Will my blog become a trusted resource for hobbyist? Probably not. Will 3,000 people read this post? Probably not. But someone Googling "Why Write a Tech Blog?" might, and that person is this post's intended audience.
Why write a tech blog? I have my reasons. Now it's time to get back to my projects.
-Matthew
A blog following my endeavors as I explore the world of Arduinos, robots, and magic smoke.
Thursday, August 29, 2013
Tuesday, August 27, 2013
Introduction to myrobotlab (MRL)
For a while I have been wanting to do a little vision processing, and being a FIRST robotics alumni I had seen a bit of this done. While I had never been actively a part of the programming, I also knew that FIRST teams get a "free" copy of roborealm with their kit every year, and that is what many teams use for vision processing. Well that is all well and good, but I like free. I began looking for a free version of roborealm and found myrobotlab.
Well for those that may be coming from the land of Arduino (like me) MRL is completely foreign. At first glance, it looks all GUI and friendly, then you discover a hidden underworld of features that can only be found by someone who already knows where they are. Regardless, after getting it installed, getting OpenCV (a widely used computer vision library. See HERE) up and running is pretty simple. You can have your camera finding your face in a matter of seconds. Now, doing something with that data is more tricky.
Now like I said, I am in no way a trusted source on this, but this is my take on how MRL works. You have a set of services running within a Java infrastructure. These services can do just about anything. At the time of this writing the main way you link these services together is by a Python service. From there you can set up the links from service outputs to service inputs. There's just one problem. How do you know what each service can input and output?
Well that is where not being a real programmer is a real pain. Basically, play around with stuff. Look at the examples on each service page and HERE. If you encounter a problem, post on the forum or in the chat and ask a developer. With features progressing so quickly, sometimes examples get left behind. One useful forum topic on this is found HERE. In it GroG discusses several ways to look at the various methods for communicating with each service.
That's about all I can say about it. I have been playing around with it, and as someone who learned to "program" on an Arduino less than a year ago I can say that the fog does lift. Play with some examples and ask questions, and you will figure it out. Of course, if you already know Java or are a real programmer, I'm sure you will have no problems with it.
I have been playing around with the serial, keyboard, and opencv services mostly. Hopefully I will be able to post some cool projects with them in the very near future. Until then, check out myrobotlab. Such opensource projects are always neat to check out even if you aren't going to use them. The people on there are always nice, and I'm sure there's room for one more user.
-Matthew
Friday, August 23, 2013
Arduino Mega 2560 r3 Doesn't Show Up in Tools Menu
Recently, I have had problems with my Arduino Mega 2560. Serial communications would drop in and out. It would not show up in the Arduino IDE Tools menu. Annoying stuff. Looking around on the internet, it appears that this is a fairly common problem, so I thought I would post what I know about a solution.
If your Arduino Mega doesn't show up in the Tools menu, the first thing you need to do is open the device manager (on Windows. If you have a Mac then you should mail it to me and go by a Windows machine). From the device manager we can further diagnose the problem.
1) Your Arduino shows up nicely under the COM ports tab. This is quite possibly the most frustrating problem, and as far as I can tell no one really knows why this happens. Here are some things that I did that sometimes worked. Try a combination of them.
4) Your Arduino shows up as an Atmel device called ATmega16U2. Well this means the same thing as above. It is in DFU mode except you have already loaded the Flip programmer driver. You have already started the process, so go HERE and finish.
5) Your Arduino does not show up in the device manager at all. This is a pretty major problem, but I found this one almost freeing. You can try various things. If you have an external ISP you may be able to reflash the ATmega16U2 and save it. I believe there are some instructions for doing so in a README file in the Arduino firmware folder. You should try a different USB cable obviously. Wiggle the wires. Blow out the connection with air. However... the chip may be fried. What does this mean?
If it is just the ATmega16U2 that is trashed then you can still use your Arduino Mega! Now you will just need an external programmer to program it. I recommend having one of these anyway. A USBtinyISP is maybe $15. I have used it extensively with ATtinys and even detail how to use it with a Mega HERE.
But now you want to get that nice Serial Monitor for debugging. Well that again will require extra hardware. You will need an external USB to UART cable. I talk about them HERE. Mine was $4. It's a worthwhile purchase anyway.
If none of those things tickle your fancy, buy another one. Places like HobbyKing sell them for less than $20 (HERE). Look for "Arduino compatible" boards. No one likes a counterfeit.
One last problem that I want to throw in here. The Tools menu freezes or crashes. There are mentions of this HERE. Like I said above, turn off your WiFi. You can also look and see if there are any Bluetooth scanning programs running. I haven't found any quick way of doing this besides looking through the system processes and closing stuff that sounds suspicious. Believe me, I know how annoying this problem is, but that's life. Arduino 1.5 does seem to do a bit better.
If you have other ideas, suggestions, or words of encouragement comment, and let the world know. There may be other things out there you can try.I hope this brings you success. Good Luck!
-Matthew
If your Arduino Mega doesn't show up in the Tools menu, the first thing you need to do is open the device manager (on Windows. If you have a Mac then you should mail it to me and go by a Windows machine). From the device manager we can further diagnose the problem.
1) Your Arduino shows up nicely under the COM ports tab. This is quite possibly the most frustrating problem, and as far as I can tell no one really knows why this happens. Here are some things that I did that sometimes worked. Try a combination of them.
- Disconnect and reconnect the Arduino
- Re-install the Arduino Drivers
- Re-install the Arduino Drivers deleting them when you remove them. ( I believe there was an update to the Mega driver somewhere around Arduino 1.0.2)
- Restart the Arduino IDE
- Turn off your WiFi (My computer has bluetooth built into the network card. Bluetooth COM ports can cause problems sometimes. Turning off networking solves this).
- Reinstall the ATmega16U2 firmware. (Instructions HERE)
- Get frustrated and go work in your garden
2) Your Arduino shows up as an unknown device. Install the drivers. I can't think of any other reason this would happen.
3) Your Arduino shows up as an unknown Atmel device. The Arduino Mega 2560 r3 has a ATmega16U2 that acts as a USB to serial chip. If you are getting an unknown Atmel device it means that this chip has been put into DFU mode. This is not the end of the world. Usually you can just disconnect and reconnect the Arduino, and it will go back into it's normal mode. If that doesn't work see my previous post on this subject.
4) Your Arduino shows up as an Atmel device called ATmega16U2. Well this means the same thing as above. It is in DFU mode except you have already loaded the Flip programmer driver. You have already started the process, so go HERE and finish.
5) Your Arduino does not show up in the device manager at all. This is a pretty major problem, but I found this one almost freeing. You can try various things. If you have an external ISP you may be able to reflash the ATmega16U2 and save it. I believe there are some instructions for doing so in a README file in the Arduino firmware folder. You should try a different USB cable obviously. Wiggle the wires. Blow out the connection with air. However... the chip may be fried. What does this mean?
If it is just the ATmega16U2 that is trashed then you can still use your Arduino Mega! Now you will just need an external programmer to program it. I recommend having one of these anyway. A USBtinyISP is maybe $15. I have used it extensively with ATtinys and even detail how to use it with a Mega HERE.
But now you want to get that nice Serial Monitor for debugging. Well that again will require extra hardware. You will need an external USB to UART cable. I talk about them HERE. Mine was $4. It's a worthwhile purchase anyway.
If none of those things tickle your fancy, buy another one. Places like HobbyKing sell them for less than $20 (HERE). Look for "Arduino compatible" boards. No one likes a counterfeit.
One last problem that I want to throw in here. The Tools menu freezes or crashes. There are mentions of this HERE. Like I said above, turn off your WiFi. You can also look and see if there are any Bluetooth scanning programs running. I haven't found any quick way of doing this besides looking through the system processes and closing stuff that sounds suspicious. Believe me, I know how annoying this problem is, but that's life. Arduino 1.5 does seem to do a bit better.
If you have other ideas, suggestions, or words of encouragement comment, and let the world know. There may be other things out there you can try.I hope this brings you success. Good Luck!
-Matthew
Subscribe to:
Posts (Atom)