Analyzing Squirrel Behaviour and Weather Forecasting with MATLAB and ThingSpeak

Lord Kelvin said, “If you can not measure it, you can not improve it.” In Carsten’s project, he built a squirrel feeder complete with sensors and a camera. The “Squirrel Cafe” allows squirrels to lift a cover and take a peanut. When that happens, data gets collected and the feeder tweets its data summary with a photo. Carsten is learning a lot about the behaviours of the squirrels and is also trying to forecast the coming winter based on how many nuts are being taken. Behind-the-scenes, he is using Raspberry Pi, ThingSpeak, and MATLAB.

Squirrel Monitoring

The Squirrel Cafe is connected to the ThingSpeak IoT Analytics platform using the Raspberry Pi. The Raspberry Pi collects data from a tilt sensor, temperature sensor, and a camera to determine how many nuts the squirrels are taking. Whenever the lid opens, the current temperature gets measured by the DS18B20 sensor and sent to ThingSpeak for storage and analysis using MATLAB.

Squirrel Cafe System

Carsten is also testing a theory. He noticed through observation that there might be a correlation between the number of nuts that get taken from the feeder and how long the coming winter season will be. This winter forecast and “nuts per minute” calculations are being performed by ThingSpeak’s MATLAB Analysis app. We are excited to see what the results prove in the next few years.

For full project details and source code, visit Carsten’s website for this project at www.TheSquirrelCafe.com.

 

Analyzing CheerLights with MATLAB

CheerLights is an Internet of Things project created by Hans Scharler that allows people’s lights all across the world to synchronize to one color set by Twitter. This is a way to connect physical things with social networking experiences and spread cheer at the same time. When one light turns red, they all turn red.

CheerLights uses ThingSpeak to collect the latest color. We get the color value by following “CheerLights” on Twitter using the TweetControl app. When someone Tweets using “CheerLights” and a color name, the TweetControl app writes the color to the CheerLights Channel on ThingSpeak. Other developers wanting to join the CheerLights project read in the latest color value using the ThingSpeak Channel API and then set their light color to the same one.

With some MATLAB Analysis and Visualizations, I know that currently red is the most popular color on CheerLights! I have recently taken advantage of the MATLAB integration with ThingSpeak. Under Apps -> MATLAB Analysis, we have an example that will show you how to analyze the public CheerLights Channel on ThingSpeak to determine the most requested color. The MATLAB Analysis example is called, “Analyze text for the most common color”.

Example MATLAB Visualization Code

lights = thingSpeakRead(1417,'OutputFormat','table','NumDays',30);
hist(categorical(lights.LastCheerLightsCommand))
set(gca,'XTickLabelRotation',45)

CheerLights_MATLAB_Histogram

People all over the world have joined CheerLights by making all kinds of light displays, apps, and browser plugins. I recently created a CheerLights display for my parents using a LIFX Wi-Fi Light Bulb. If you want to control all of the lights, just send a Tweet using Twitter that mentions @CheerLights and a color.

“@CheerLights Let’s go Blue!”

Check out CheerLights.com for more detail and for ideas on how to join the project. We are all connected!

[via CheerLights.com]

Soldering Iron Connected to ThingSpeak with #NodeMCU and #ESP8266 Wi-Fi

[Vegard Paulsen] created a solder iron that reports its usage and temperature to ThingSpeak and alerts him when it was left on. He uses an NodeMCU / ESP8266 Wi-Fi module to collect the data and post it to his ThingSpeak channel. Once the data is on ThingSpeak, he is able to send push notifications to his phone using the ThingSpeak React App.

Soldering Iron IoT ThingSpeak

Hackaday.com wrote an article about Vegard’s soldering iron connected to the Internet of Things. Here’s what they had to say:

The data pushes out to the ThingSpeak server which handles pushing data out to the bigger network, and data representation (like the cool Google gauge…). The best part: [Vegard] gets a phone notification when he accidentally leaves his soldering iron on. How perfect is that?

That looks a lot like our desks… wires, microcontrollers, pliers, cutters, Wi-Fi modules, and soldering irons. And now, the soldering iron is on the Internet of Things.

[via Vegard Paulsen / Hackaday.com]

Basement Dehumidifier Tweets Its Humidity with ThingSpeak and ESP8266 Wi-Fi

ThingSpeak user, Spencer, adapted a humidifier that sits in his basement. He is solving a common issue about humid basements. If your dehumidifier fails, you get wet things you have stored and then mold. Spencer created a humidity board using the DHT22 that measures humidity and then reports the data to his ThingSpeak Channel via the ESP8266 Wi-Fi module. Once the data is stored in ThingSpeak, he uses ThingSpeak React to update Twitter when things get out of whack.

Basement Dehumidifier Twitter

[via Twitter]

Let Your Plants Tweet Using Spark and ThingSpeak

Head over to Instructables to learn how to make your plants Tweet using Spark Wi-Fi and ThingSpeak. Gregory Fenton created a project that monitors his plant’s soil moisture and then notifies him via Twitter when it is time to water it.

Spark ThingSpeak Plant Monitor

Greg built the project out of necessity to help his plants suffering from “localized drought”. Let’s hope his plants get proper watering and that other ThingSpeak users can quickly and easily build this project. Thanks for sharing!

[via Instructables]

CheerLights Arduino Sketch for FastLED Compatible Lights #featurefriday

We just created a FastLED and Arduino tutorial and Arduino Sketch to read in the latest CheerLights color and display it on FastLED compatible lights. CheerLights is a global network of colored lights that all synchronize to one color based on Twitter. People all around the world have built very creative displays of the latest CheerLights color. The new tutorial and Arduino sketch will make it easy to get started with NeoPixel lights from Adafruit and RGB-123 light panels.

CheerLights with Arduino FastLED RGB-123

For more information check out the FastLED and Arduino tutorial and the Arduino Sketch on GitHub.

Instant TweetControls #featurefriday

We spent some time enhancing our TweetControl App. TweetControl allows you to control things with Twitter. You setup a TweetControl to listen for a keyword mentioned on Twitter and we execute any web service API call that you specify. Developers have created racing cars, political campaign trackers, and we use it for the CheerLights project.

As more and more users create TweetControls, the service started slowing down. We have enhanced how the service works and now you get instant TweetControls!

In an Instragram video sending a Tweet and changing the CheerLights color, you will see that there is little delay between sending the Tweet and executing the control command to change the colors on his Christmas tree.

Learn more about TweetControl on ThingSpeak Docs.

Sending Tweets Automatically Every Morning With TimeControl

TimeControl can be used to send Tweets automatically at predetermined times.  In this tutorial, we’ll be sending a Tweet every weekday with the current time and the current CheerLights color.

The first step is to link a Twitter account to ThingSpeak.

Next, we’ll create a new TimeControl with the following values:

  • Name: “CheerLights to Twitter”
  • Frequency: “Recurring”
  • Days: “Mon”, “Tue”, “Wed”, “Thu”, “Fri”
  • Time: “9:40 am”
  • Fuzzy Time: “+/- 10 minutes”
  • Action: “ThingTweet”
  • Tweet: “It is currently %%datetime%% and CheerLights is %%channel_1417_field_1%%.”
  • Twitter Account: (select your linked Twitter account)

Save this TimeControl and you’re finished.  Every weekday within 10 minutes of 9:40 am in your timezone, TimeControl will send a Tweet with the current datetime and the current CheerLights color.

The CheerLights Channel ID is 1417, and colors are saved in field 1, so %%channel_1417_field_1%% will be replaced with the current CheerLights color.  You can change these values to access the most recent data from your own Channels.

Here’s an example Tweet from this tutorial.

Celebrate the Holidays by Joining CheerLights, a Global Network of Lights #iot

For the third holiday season in a row, the CheerLights project is gearing up. The idea behind CheerLights is to show that we are all connected by synchronizing the color of lights around the world. Christmas lights are a staple around the holidays and with Internet-connected lights, the color of your lights matches the color of everyone else’s lights.

It has been a real treat watching this project evolve as more and more people add lights… and other things. Things like Android and iPhone apps that check the latest color of CheerLights, Christmas trees, and robots.

To control the lights around the world, send a Tweet mentioning @CheerLights and a color. The command is processed by the ThingSpeak IoT analytics platform and distributed to all of the lights listening to the CheerLights API.

@CheerLights I am dreaming of a White Christmas

Internet of Things

Another powerful aspect of the CheerLights project is that is shows off what is possible with the emerging Internet of Things. With a single message sent via a social network like Twitter, 1000′s of objects around the world are in sync with each other. Lights are connected by many types of controllers, such as Arduino, ioBridge, Philips, and the Raspberry Pi. This project is only possible through the Internet and the coordination of developers around the world.

In the article, “How the Internet of Things Will Change Our Lives“, CheerLights is included to indicate how we are connected and how objects may bring people closer.

Learn how to join the project at CheerLights.com.

We are all connected…

Send Tweets using Arduino Ethernet [Updated Tutorial]

We have updated our ThingTweet Tutorial to cover the Arduino Ethernet and the new Arduino IDE (v1 and above). ThingTweet is a ThingSpeak App that allows you to send Twitter status updates via your Arduino microcontroller with an Ethernet shield or with Ethernet integrated onto one board. Our Arduino examples for ThingSpeak and ThingSpeak Apps have been moved to GitHub, so that you can easily download, modify, and contribute updates.