Posts

Showing posts from April, 2018

Sonar Scanner

Image
As part of an ongoing project I sourced a mounting bracket for an HC-SR04 ultrasonic sensor sitting on top of a 9g servo motor that can be used to rotate the sensor through a 180 degree arc. I also wanted to include a DHT11 temperature sensor to help determine a more accurate speed of sound. The final setup will probably be run from an Arduino Nano but before planning that I wanted to run some tests on a handy Uno as that has more power supply pins immediately available. The actual rats nest is shown. Here are how the components are wired up to the Arduino. The DHT11 I have is mounted on a little board that includes a pull-up resister between Vcc and the data pin and in fact only exposes Vcc, Ground and data out pins. This is the most common format around as far as I can see and adds up to a nice package that has reasonable accuracy (within 2C in the range 0C to 50C). I downloaded and installed the DHT library from Adafruit  to read the sensor although there are others aro

Visual Studio and Arduino

Image
Following on from my little excursion into the Raspberry Pi world I thought I should make amends by mentioning the support that you can get from Visual Studio for Arduino development. The Arduino IDE is pretty good in the main. It has a few clunky bits but it is fine for quickly getting some code running but issues do arise when the code base grows. I have tried the option to use an “external editor” with Notepad++ (which is a tool I use a lot in general code development) but it is still not an optimal experience. Some Arduino developers use Eclipse and I got a lot of experience with that tool when I first started programming for the Android platform before Android Studio became the norm. There is also Visual Studio Code which is another great tool and has a confirmed place on my Apple mac. For me though, the Visual Studio IDE is the “stand out” developer’s tool. If you fancy the lighter weight Visual Studio Code then there is a great extension for that IDE in the Visual Studi

Visual Studio and Raspberry Pi

Image
As this blog is mostly about using the Arduino platform this might seem slightly "off topic" but I am working on a robot project that will include a Raspberry Pi along with (at least one) Arduino. Background is that I have been working on a project that means writing a lot of C and (inevitably) C++ code often building the same code base on an Arduino board and on Microsft Windows using Visual Studio. I had seen the recent post called “ Visual Studio Can Do That? ” which covers handy “add in” items and lesser known features to illustrate the broad scope of this brilliant and free IDE. The last item “Deployment” got me wondering about just how easy it might be to write and debug code directly on a device. Looked like the Raspberry Pi is very much doable as the OS running on the board can support SSH (and Virtual Network Computing VNC) to make this straightforward. To give this a whirl, I soldered a set of headers to a Raspberry Pi Zero W board. 40 pins of hell later… In