Since my last blog, I have made some new decisions. The Seeeduino Xiao has a very few pins and it would require me a lot of pins to connect two led strips + sensors + communicating with the Arduino Nicla Vision, I have decided to buy the Seeeduino Expansion Board. You can see below the board and the soldered Seeeduino Xiao board.
You can find below more about the expansion board.
Expansion Board Base for XIAO | Seeed Studio Wiki
What I love about this board is the monitor, the SD card slot and the battery slot. All these features can be really useful for the SHEMS since I can record data of activity on the SD card and then plot the activity day by day on the monitor so to show how much energy has been used in the past few days. The expansion board has a built-in button that I can use to change prompts on the monitor. The monitor can display usefel things like a plot of energy consumption, the weather, and many other things.
I bought something else for the RGB led strips in my bathroom. Apparently, the Seeeduino has a RGB Led strip driver with everything already built-in. That is fantastic so I don't have to buy MOSFETS and resistors. Also, something that I like about the drivers is that I can chain two (I am not sure if I can chain 3 or more but I don't need that many). This is really helpful so it reduces the number of pins required. Something that I don't like is that in order to send the command to the second led strip I need first to send a command to the first led strip. This means I will also need to remember the previous state of each led strip. It just adds a little of complexity in the Arduino code. About Arduino code, you can find it below:
// Author:Frankie.Chu // Date:March 9,2012 // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA /***************************************************************************/ #include "RGBdriver.h" #define CLK 4//pins definitions for the driver #define DIO 5 RGBdriver Driver(CLK,DIO); void setup() { } void loop() { Driver.begin(); // begin Driver.SetColor(255, 0, 0); //Red. first node data Driver.end(); delay(500); Driver.begin(); // begin Driver.SetColor(0, 255, 0); //Green. first node data Driver.end(); delay(500); Driver.begin(); // begin Driver.SetColor(0, 0, 255);//Blue. first node data Driver.end(); delay(500); }
I have used the code provided in the Wiki. I am attaching below so you can download the libraries as well.
Grove - LED Strip Driver | Seeed Studio Wiki
I am having so issues though. I still can't connect the Expansion board to the driver. I have used pins 4 and 5 to send data to the driver but they just don't want to change. At least, now the strip is the whitest I have ever seen (but still appear pretty much blue on camera). Maybe somebody can help me with the pinout and Arduino code. If somebody know what I am doing wrong, write in the comment.
I have already started connecting the Nicla Vision board to Edge impulse. I encountered some issues but nothing that couldn't be fixed by just unplugging and plugging back in. I will talk about more next blog.