![]() I still had no data, so to force each data point to be saved, I added the line: Perhaps I had not been running the logging for long enough during testing to actually get any of my data saved! So I ran a longer test over several minutes, and checked again. Alas, there were several txt files, but each was empty, with no data logged whatsoever!Ī little digging in the Adafruit documentation shows that in fact the data is being stored in a buffer, and only written to file every 50 datapoints. We can see the voltage being read and printed to the serial console, to check that the data was being written to the log file, I powered off the Adalogger, removed the SD card and put it into my PC, and opened the txt file. This functionality is built-in to the board, meaning we don’t have to worry about errors in our own wiring – simply the code working or not. I took this code and modified it to read and log the voltage of a LiPo battery connected to the Adalogger. Again, there is an example sketch to do this that comes with the IDE, but there is a simpler version available on Adafruit’s GitHub. Now we can try to write some data to the card. You should see something similar to the screenshot below: Upload the sketch to the Adalogger, then open the serial console (by clicking the small ‘magnifying glass’ icon in the top right of the IDE). We will use an example sketch that comes bundled with the Arduino IDE to try to get some information about the card (and is a good basic test). Start by formatting the SD card with a FAT filesystem, I used the formatting tool found here. Now that we know we can upload sketches to the Adalogger, let’s try to write some data to an SD card. If the above steps were completed successfully and all goes well, you should see the onboard red LED blinking away. Open the sketch and try uploading it to the board. ‘Blink’, found in Files>Examples>Basics>Blink is a great place to start. Select it, and you are ready to upload a demo sketch to the board. Heading to the Tools> Ports drop down menu should show the Adafruit Feather M0 assigned to a COM port. The computer will recognise the device and create a COM port. The board automatically switches to USB power, so there is no need to flick a switch or set a jumper to the correct pin. ![]() Now we can connect the Adalogger to our PC using a micro USB cable. Following this, it is best practice – though not strictly necessary – to quit and restart the Arduino IDE.If you are running Windows, you will need to download and install additional drivers from Adafruit, ensuring that you select ‘Feather M0’ during installation. First, scroll down to find the Arduino SAMD Boards (32-bits ARM Cortex-M0+) by Arduino tab (a bit of a mouthful!) and install the latest version (1.6.9 at time of writing).Staying in the Boards Manager, navigate to the Adafruit SAMD Boards by Adafruit tab and install the latest version (1.0.13 at time of writing). Next, navigate to the Tools menu, then Board > Boards Manager. In the Preferences menu, locate the Additional Boards Manager option, and add the following URL:Ĭlick OK to save. ![]() For this post we will be using the Cortex-M0 version.īefore connecting any additional peripherals, let’s first get the Adalogger working with the Arduino IDE, so we can test out some demo code (or ‘ sketch’, in Arduino parlance).įiring up the latest version of the IDE (1.6.13 at the time of writing), we need to add a URL to the Additional Boards Manager before we can connect to the board. It should be noted that the Adalogger comes in two variants: one with an ATSAMD21G18 ARM Cortex-M0 microcontroller, the other with an ATmega32u4. In this post we will take a look at the Adalogger – an all-in-one data logger – including on-board USB, a microSD card holder and even LiPo battery charging! We will get it up and running with the Arduino IDE, before connecting an Adafruit accelerometer board and logging some data. A comprehensive overview of the Feather boards can be found on the Adafruit website. Each share the same small form factor and include LED matrix displays, WiFi and LoRa modules and more. Compact ARM Cortex-M0 board for low-cost data loggingĪdafruit Feather is a range of Arduino compatible development boards designed to be flexible, portable and light.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |