digiPlant is a Universal Windows Platform app that helps users monitor their plant. The app collects, tweets, and displays temperature, brightness, and soil moisture data from various sensors. It runs on a Raspberry Pi and Windows 10 IoT Core.
Hardware Setup
The fritzing diagram and the list of materials show how the hardware can be built. The photocell and the soil moisture sensor will need the ADC in order for it to measure data and give meaningful results. The soil moisture sensor will also need soldering.
MainPage.xaml.cs
This page displays live data that are collected by the various sensors within ellipses. The colors give a sense of how close the current data is to ideal values (which can be altered by the user).
TwitterPage.xaml.cs
This class allows users to be able to have their plant tweet status. The UI describes how to set up a Twitter account, and the fields required to connect to a Twitter page is displayed. There is also a running history of the tweets that the plant has made.
SensorDataProvider.cs
This class creates all of the sensor objects. Then using a timer, the app receives the measurement from the sensors every three seconds, and sends the sensor, time of measurement, and value of measurement to the main page where it will be displayed.
/**
* This method records on a timer the data
* measured by the temperature, brightness, and soil moisture sensor,
* then organizes all of the information collected.
* */privateasyncvoidtimerCallback(object state)
{
//ensures that the temperature sensor is initialized before it is measured from if (BMP280 == null)
{
Debug.WriteLine("BMP280 is null");
}
else
{
//receives the value from the temperature sensor and saves //the data in the SensorDataEventArgs class, which holds //the sensor name, the data point, and the time the value was measured. //this data is then sent back to the main page and the UI is adjusted based //off of the measurement. //float currentTemperature = (float) rand.NextDouble() * 10; float currentTemperature = await BMP280.ReadTemperature();
I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt out if you wish.ACCEPTCheck Privacy Policy
Manage consent
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.