Skip navigation
1 2 3 Previous

Andy Clark's Blog

43 posts
I've been experimenting with the Arduino MKR Zero board and wanted it to act as a USB keyboard. This board is based on the SAMD21 processor core which has a native USB wired to one of the sercom peripherals. But when I tried it out the keyboard was not sending data to the PC. I swapped to the simplest example I could find but still no luck. I also tried the https://github.com/NicoHood/HID library to see if that worked any better than the Arduino one but no luck.   Looking in device manage ...
After experimenting with the V2DIP1-48 from FTDI connecting over SPI, SPI Slave on an Arduino MKR Zero, I wasn't sure if the Arduino code or the FTDI firmware was the problem. After some more experiments I concluded that there was definitely something up with the firmware.   Reading one of the examples, I spotted the following gem: This sample has been designed for the V2Eval Board Rev 2.0 and later. V2Eval Boards have the version printed on the silk screen next to the V2EVAL label. The ...
I've a device which acts as a SPI Master and sends data over to my microcontroller which is acting as a slave. Simple, I thought, there'll be some stuff in the Arduino SPI library that will help with that. But no, that's just for the master case. When I googled it, I found many examples like this one https://gist.github.com/chrismeyersfsu/3317769 from Chris Meyers which uses the SPCR and SPDR registers and an ISR interupt to process the data. The problem is, that all three of these things are AV ...
I've recently been looking at machine learning techniques for analysing data, in particularly text classification and sentiment analysis. For this I'm using Tensor Flow Lite which can be run against edge devices such as microcontrollers. Thanks to Simone Salerno, I've got this running on an Arduino MKR Zero using his EloquentTinyML library.   But there are some challenges with processing text. To get the best results some processing is recommended. The raw text is filtered and cleansed, ...
At the end of the previous year, I'd been working on an Azure Sphere based project and that drew to a conclusion in January due to the immaturity of the SDK at the time. But the project was reimagined as the enchanted compass using an Arduino MKR1000 and 3D Printed shell.   So I then started on a UV Exposure badge based on the Pocket Beagle, this project was then adapted for a magazine article for Diyode magazine and a custom PCB and ATMega/Arduino board was made. In the process I learnt ...
I have just been sent a PanaVise Jr and a few other goodies thanks to Daniel from Element14.   From young age I've just soldered stuff on a solder mat, propped up as required, I did try a small plastic vice in the past but it was not really working so I went back to my old ways. Fairly recently I started using a simple crocodile "helping hands" and that got me thinking about a proper PCB Vice and how that might speed up soldering and make my task easier.   The PanaVise Jr is just one ...
My experiments with U-Center and the GPS module had shown that the direction indication was not very reliable. Following a link in Kevin Saye's post, I discovered a command that should tell the orientation. But my device did not seem to be generating that. http://aprs.gids.nl
mea/#hdt   Reading a bit further, I realised that the compass feature was provided by a  HMC5883 connected over I2C on a second connector. So I soldered a green wire onto the SCL connector and a blue wire to th ...
OptoSensor As David Murphy mentions, a stepper motor solution needs to know where the arrow is pointing when the device starts up. Looking in the spares box, I saw I had a Omron EE-SY310 reflective sensor from an old tachometer project, I used the phone camera to test the IR LED was working. This device has an open collector output so it will pull a floating signal to ground. There does not seem to be any configurable pull-ups on the Azure Sphere so I added my own pull up resistor between O a ...
From the Overview in Visual Studio, you can get the "Device Status", from there you can get the application status of the attached device. It's also possible to launch the Azure Sphere developer prompt from here and run the "azsphere dev show-attached" command. When I ran that it showed that my operating system was out of date which makes sense given the SDK update earlier in the week. OTA updates If you run the show ota commands you can see what version and details you are running.   ...
Updated SDK This week there was an update of the SDK for the Azure Sphere so I thought I'd download that and the other tools I was using. The SDK now has support for storage, real time clock, storage and external MCU flashing, although it looks like the documentation and examples need a bit of work still. https://azure.microsoft.com/en-us/blog/update-18-11-for-azure-sphere-in-public-preview/   One message in the update was that there was a updated network driver for running a VPN over U ...
For my IOTCompass I need to be able to determined the direction to turn in. This can be done by passing the current and target positions to a function which can calculate a bearing. The calculation for this is approximated by the following formula as it does not take into account the wobbly shape of the earth:   Formula: θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ ) where φ1,&la ...
As hinted at in some of the previous posts I'm going to be using the board to complete a small project. Because the SDK only supported UART and GPIO at the time I started the project I was looking for something that could be run with that. My first thought was some sort of guage using a stepper motor. Then a chance discussion with my boss about the flakey GPS collar he has on his dog got me thinking if there were GPS modules that use serial comms. I found a suitable module whcih was designed for ...
As mentioned in the Azure Sphere Secure IOT - First look the next step is to "claim" the board. This registers the device with the portal so you can remote control it.   Login One of the things installed with the dev kit is the Azure Sphere Developer Command Prompt. This is just a console window where you can type the azsphere commands necessary to setup the kit. To login you use:   azsphere login  The documentation states that you need to have a work or school account. However, ...
The magnifying glass and even a microscope came out today as I took a closer look at the board. I like how the headers have a bit of spacing between them, lets see if that's sufficient to allow for connectors. I'm a big fan of the mounting holes / standoffs even if they did get in the way of the microscope.   See https://docs.microsoft.com/en-us/azure-sphere/hardware/mt3620-user-guide     Azure Sphere Close Up Front of the board with the headers, main SOC, antenna, status LE ...
Overview  Azure Sphere is a new platform from Microsoft it consists of a system on chip, SDK and online tools for management. The key problem they are trying to solve is making IOT devices secure.     Some of the principles they've used are described in the "Seven Properties of Highly Secure Devices" white paper, a summary shown in the table below. To achieve this, they have designed a new architecture along with MediaTek, the system on chip MT3620. This consists of multipl ...