Author Archives: admin

Google: The Misinformation Search Engine

The Decline of Google Integrity.

Google has committed the cardinal sin of search engines. It is returning skewed results based on the Social Justice Warrior (SJW) biases of its workforce. A search engine whose results can no longer be trusted to be impartial, has no value. I believe Google has reached that tipping point today.

I used to love Google. I bought into their promise to: “Don’t be evil”. Unfortunately, the old saying that “Absolute power corrupts absolutely” appears to be true with them. As they achieved monopoly status in the search field, they decided that buckets of money was no longer enough. Now, they would use their search-engine-might to spread their SJW ideologies to the world, and to suppress ideas they don’t agree with. This is totally unacceptable.

Google’s new YouTube Policy will also hide videos that they disagree with. According to the new policy, “The videos will remain on YouTube behind an interstitial, won’t be recommended, won’t be monetized, and won’t have key features including comments, suggested videos, and likes.”

So the videos that Google doesn’t agree with will be invisible, unless you have a direct link to them, and the video creator will not be eligible for financial compensation. Wonderful.

Even worse, if you search for these videos, you may be redirected to videos that support Google’s political views. As they state it: “When people search for sensitive keywords on YouTube, they will be redirected towards a playlist of curated YouTube videos that directly confront and debunk violent extremist messages.” Based on changes I’ve seen with conservative content on YouTube, Google considers any conservative opinions to fall under that category.

Google Thought Police Are Watching You

Google has become infested with SJW’s. I think SJW’s are particularly insidious because they pretend to be diverse and inclusive, when in reality, they oppose diversity of thought, and would exclude anyone who doesn’t agree with their ideas.

They are unwilling to discuss or debate any opposing ideas. Their first defense mechanism seems to be to call out anyone who disagrees with them as hateful, a racist, a bigot, or some other nasty appellation.

Recently, Google has been in the midst of a scandal over the leak of an internal document created by Google employee James Damore, which they called an “Anti-Diversity” memo. It is anything but an anti-diversity memo. To quote from the memo:

“I value diversity and inclusion, am not denying that sexism exists, and don’t endorse using stereotypes. When addressing the gap in representation in the population, we need to look at population level differences in distributions. If we can’t have an honest discussion about this, then we can never truly solve the problem. Psychological safety is built on mutual respect and acceptance, but unfortunately our culture of shaming and misrepresentation is disrespectful and unaccepting of anyone outside its echo chamber. “

It calls out for diversity of thought, and for open discussion of ideas. Google’s reaction to this memo is telling. James Damore, was fired. He dared express a different opinion. He proposed ideas which upset the Google group-think. He didn’t threaten anyone with violence. He just asked for an open discussion of ideas.

But the internal SJW response from Google was marked with violent threats and refusal to even discuss the ideas that James presented, which were supported by scientific research that he cited in his memo.

One Google Employee, “Defending Cville”, tweeted: “I would just walk to his desk and beat the sh*t out of him”. Why is she still an employee, while James Damore was fired? What a wonderful place Google must be to work, where people want to physically assault you for disagreeing with them.

In fact, at least one engineer was punched in retaliation for something he posted. This interview with a previous Google employee, confirms not only the violence, but the blacklisting and discrimination that is rampant by the SJW’s at Google: “I know at least one engineer did get punched in retaliation for something he posted — I am sure he will corroborate this to you directly.”

Another Google employee, Colm Buckley, tweeted “there are certain ‘alternative views, including political views’, which I do not want people to feel safe to share here…”. He also stated that “Yes, this is ‘silencing’. I intend to silence these views.”

Yet another Google employee, Anthony Baxter, tweeted: “I will absolutely go out of my way to make sure I never work with anyone involved with or who endorsed that garbage”.

There are many other examples, you can read for yourself at Breitbart.

Internally, SJW managers at Google are bragging about blacklisting those who disagree with their political views:

Adam Fletcher of Google will not tolerate differing views, stating:

  • I will never, ever hire/transfer you onto my team. Ever. I don’t care if you are perfect fit, or technically excellent or whatever.
  • I will actively not work with you, even to the point where your team or product is impacted by this decision. I’ll communicate why to your manager if it comes up.
  • You’re being blacklisted by people at companies outside of Google. You might not have been aware of this, but people know, people talk. There are always social consequences.

If true, the “blacklisted by people at other companies” comment is a chilling indictment of the culture at Silicon Valley companies today.

There are numerous examples of the hostile work culture that you can read here.

Apparently, some SJW snowflakes at Google were so upset reading the memo, they stayed home from work the next day.

Are these people even adults? I’m surprised Google wasn’t handing out crayons and coloring books, like many institutions did after the 2016 election. Sheesh.

Google Has Lost Our Trust

March On Google

I encourage you to read the memo. Whether you agree or not with the author’s conclusions, he just seems to be explaining his position, for which he had done considerable research, and just asked to discuss the issue.

This is what is so disturbing about the SJW’s today. They refuse to even have a discussion with you. In fact, Google looks very similar to a cult, where people are afraid to disagree with the group think, for fear of being physically or verbally abused, ostracized, and harassed.

Google is hiring people based on diversity rather than ability. They are filtering search results which don’t match their own ideas. They are monetarily punishing YouTube authors which disagree with their viewpoints. Google is hostile to their own employees who may have differing beliefs. People are afraid to speak out. Google is trying to excise any different opinions from the Internet.

This is not a company that can be trusted to be the sole gatekeeper to the Internet. I’ve stopped using Google Search, and am now using Bing and DuckDuckGo as alternatives. The Internet must not be filtered to only display certain ideas. Even if you agree with Google’s positions today, someday they may diverge from your current world view, and you too may fall victim to Google’s abuse of power.

Protests are being planned outside of Google offices across the country on August 19, 2017. If you feel that it is imperative that our Internet Search must remain impartial, please consider joining the protest. You can find more information at MarchOnGoogle.

MonoGame Tutorial: Building a 2D Game Using C#

Completed Bricks Game
In this MonoGame Tutorial, I’ll walk you through the creation of a 2D Game using MonoGame and C#. The game we’ll be creating is called “Bricks”, which is similar to the old “Breakout” arcade game. By the time you complete the tutorial, you’ll be able to create a new MonoGame project.

We’ll talk about the Content Pipeline, and what it is used for. You’ll learn how to add images and sounds to the project and use them in a game. You’ll learn how to move and rotate images, and display text. This should be everything you need to get started on your own game projects.

Why MonoGame?

Microsoft C# and .Net are my absolute favorite development tools. For creating Windows desktop and web-based applications, they are, in my opinion, unsurpassed. However, one area where C# fell short, was in game development. Using the .Net API’s it is not possible to get the high performance required for gaming. DirectX, which is used by virtually all professional games on Windows, requires the use of the C++ language. DirectX allows low-level access of the Video Card, which makes it the fastest method of drawing on the screen for the PC.

I find C++ to be a difficult language to use, fraught with many of the same pitfalls that plague developing with C. In 2006, Microsoft provided a solution: Microsoft XNA Framework. XNA allows C# developers to access DirectX from C#. C++ is still the go-to solution if you need to squeeze the absolute last bit of performance out of a PC, but C# is now a very credible solution for gaming development. In fact, it has been used by many commercial games today.

Unfortunately, Microsoft discontinued XNA development in 2013. But, thanks to the open source community, all was not lost. MonoGame is a compatible open source version of XNA, that is still being supported. Even better, MonoGame is cross-platform, so you can develop games in C# for iOS, Android, Mac OS X, Linux and Windows.

Bricks Game

This article will describe how to create a simple game using C# and the MonoGame Framework for Windows. We will be building “Bricks”, which will be similar to the old Breakout game.

Breakout is one of the earliest video games ever developed. It offers interesting game play, but the mechanics are simple, so it provides a good subject for a MonoGame tutorial.

In the game, there is a wall of several rows of bricks at the top of the screen. A ball is bounced off a movable paddle at the bottom of the screen. It travels across the screen. If the ball hits the side or top walls of the screen it bounces. If it hits a brick, the brick is destroyed. If the player fails to hit the ball with the paddle, the ball flies off the bottom of the screen and is lost. The player gets 3 balls, and play continues until all three balls are lost. After all bricks are cleared, a new set of bricks is displayed, and play continues.

Tutorial Road map

I chose this game, because it has the basic elements needed for a great variety of 2D games. As we develop the game, I’ll be covering the following topics:

1. Overview and Setting up the Environment
2. Basic structure of a MonoGame Program (The game loop)
3. Content Pipeline Tool (How we get images and sound effects usable by MonoGame)
4. Loading Images and Sounds
5. Drawing Images on the Screen
6. Drawing basic shapes on the screen
7. Getting Keyboard and Mouse Inputs
8. Moving and Rotating Images
9. Playing sound effects
10. Drawing Text

After we get done, we’ll have a playable version of Breakout, and you should have everything you need to start your next MonoGame project.

You can download the complete source code and project from here.

Prerequisites

Note: This tutorial assumes you already know how to program in C#. If you aren’t comfortable with C# yet, you may want to look at this C# Tutorial. You will also need Visual Studio 2017. You can get the Community Edition free from Microsoft here.

Tutorial Conventions

Menu commands and button clicks will be shown in a bold font.

Field, method and class names will be shown in an italic font.

When I show source code, it will appear in blocks like this:

//line shown for context
//line to add
//another line to add
//line shown for context
//line shown for context

Lines of source code to be added are shown as highlighted, as in lines 2 and 3 in the above example. Other lines are just shown for context or discussion.

Environment Setup

Before we get started, you will need to install Visual Studio 2017. If you don’t already have it installed, you can get the Community Edition for free from Microsoft.

After you have installed Visual Studio, you will need to download and install MonoGame. Before you do, make sure you close Visual Studio. You can download MonoGame here. Select the link for the Visual Studio version. After the download is complete, run the downloaded file: “MonoGameSetup.exe”.

After MonoGameSetup is complete, you can start Visual Studio. We’ll create a new project called “Bricks”. From the File Menu in Visual Studio, select New and Project:
Create New Project

This will open the new project dialog. Under Installed/Templates/Visual C#, you will notice that several MonoGame project templates are available. For this tutorial, select MonoGame Windows Project. In the Project Name field, enter “Bricks”, which is the name we’ll use for our project. Then click the OK button to create the project:
Create Bricks Project

This will create a simple MonoGame project for us. We can run it and we’ll have the skeleton of a game already running for us. Go ahead and click F5 to run the application. You will see a new window created with the title of our project “Bricks”, and a light blue background. You can just hit the Esc key to close the window (or click the X button in the upper right of the window), to close the game.
Initial Game Screen
It’s not very exciting yet, but we already have the framework that we’ll need for the entire game. We are ready to get inputs from the keyboard or mouse, and draw on the screen. When you are ready, proceed to Part 2 and we’ll look at what’s already been created for us.

Democratic Intolerance And Thug Rule Must Stop

Democratic Intolerance

Democratic Intolerance has become an ironic pillar of the Democratic Party, along side its other new pillar: Thug Rule. Instead of winning others over to their point of view through persuasive argument, they force their ideas on others through sheer intimidation. This must stop if Democrats are to regain national relevance.

Now, I guess I’m Deplorable.

I consider myself a moderate independent, but I have voted for Democratic Party Candidates most of my life. I voted for Obama, twice. But, Hillary Clinton was such a flawed candidate, that I made the decision to vote for Trump in this election. As this election wore on, I began to feel that the Democrats had gone “off the rails”, and I found myself more and more distant from what they were advocating.

Deplorable

First, to get this out of the way, I am white, and I am male. Apparently, that makes me a deplorable, a racist, a sexist, uneducated, and all other manner of bad things. As a white male, I now find out that the Democrats believe me to be the cause of all evils in the world. One of the finalists for the Democratic National Committee (DNC) Chair, Sally Boynton Brown, recently said “We have to teach them how to communicate, how to be sensitive and how to shut their mouths if they are white”. Seriously? We should just shut up?

Personally, I think I’m a pretty nice guy. I don’t think I’m racist. I voted for Obama twice. I don’t think I’m sexist. But, I didn’t vote for Hillary, because I feel she is deeply flawed. Beyond her mishandling of the whole email thing, she has switched side on numerous issues, lied about it, and she is in bed with Wall Street. I get the sense, in my opinion, that she is more concerned with power and selling privilege to companies and other countries, and that she doesn’t have the best interests of Americans at heart. And, I have a Bachelor of Science Degree—apparently one needs a master’s degree or better not to face the condescension of the Democratic Party.

I am also appalled at the corruption in the Democratic Party that ensured the nomination of the most flawed candidate in US history: Hillary Clinton. Were the Democrats truly so foolhardy that they thought they could nominate anyone, and they would be elected?

The New Democrat Thug Hive Mind

I am disheartened by the fact that the Democrats have resorted to rioting and violence, and haven’t respected the peaceful transfer of power that our country has been known for. Frankly, it makes me fear for American Democracy. It scares me when I see Democratic leaders encouraging violence. Clinton’s Vice Presidential nominee, Senator Tim Kaine, is imploring Democrats to “fight in the streets.” So, the Democrats lose the election, and rather than facilitate the peaceful transfer of power are now asking their supporters to riot.

Raised Fist

It frightens me, when I see 100 armed paramilitary rioters (dressed as black ninjas) damaging personal property, and injuring innocents, in order to shut down free speech. And yet, Berkeley didn’t arrest a single rioter, in spite of the laws that were being broken.

It frightens me to see an American school teacher firing a toy gun at a video of our President, shouting “Die!, Die!, Die!”. Why does this person still have a job, let alone why isn’t she being investigated by the secret service?

There have been over 12,000 Democratic tweets from the left threatening our President. Totally Unacceptable and Appalling.

It frightens me to see a teacher using her position as a teacher to rant against our President, and yet the student that reported it is facing discipline, and not the teacher that abused her position.

Unfortunately, I could include numerous other incidents. But I won’t belabor the point.

We used to be respected for our democratic process. Now we act like thugs during the transfer of power.

La, La, La, I’m not Listening

What frightens me the most, is the Democratic intolerance of any position that disagrees with the party line. I am a strong believer in free speech. Anyone should be able to discuss and explain their position. I may not agree with it, but they should be able to express it.

Instead, if anyone disagrees with any Democratic Party position, they are immediately shouted down with yells of “racist, sexist, or homophobic”. I have seen very few Democrats even willing to listen to other ideas and trying to understand the opposing point of view. I never lived through McCarthyism, but I can’t imagine anything more frightening than the shut down of ideas that we have today. I find it hypocritical and ironic that while the Democratic Party preaches tolerance, they are intolerant of anyone who disagrees with them and try to shut down any opinion that does not agree with theirs.

Up Next, The News Propaganda

I find the bias in the media also disturbing. When I was younger, the media reported the news. Now they report only news that supports their positions and slant it to support their position. Watching the election coverage was very illustrative. MSNBC and CNN had the worst coverage I can ever remember. They were openly biased towards Clinton.

MSNBC’s Rachel Maddow started out the evening jovially enough, as she explained what Hillary would do as she became president. And, she joyfully explained why it was impossible for Trump to win. But as the evening wore on she began to lose it, and when the results were clear at the end of the night, she ended with this tirade against Trump.

Don’t You Make Me Cry!

Coloring Book Therapy

I was in shock when after the election, students were so distraught that they had to be issued coloring books and Play-Doh, or have tests canceled. Is this how we are raising our next generation of leaders? To cry when things don’t go our way? I guess this is what happens when you don’t keep score at kids’ soccer games.

Folks, in the real world, people keep score. We are not doing any favors by “protecting” our kids from the realities of the world. Are these fragile snowflakes to be the future leaders of our country?

Bathrooms, Yes! Jobs, Who Cares?

The Democratic Party is also moving away from a number of family values in favor of support for fringe lifestyles.

I am pro-life. This has long been an area where I have been in disagreement with the Democratic Party, but it was not enough, in and of itself to alienate me from the party in the past. I feel like after the point of conception, we have a human life. Abortion is just a sanitized term for killing a new life. I find it amazing that we hold ancient cultures in disdain that abandoned unwanted babies in the cold to die, while we cut out, and kill live babies in development from the womb.

The Democrats have also become obsessed with transgender bathrooms. I feel like this is a safety issue for women. There have already been numerous issues with males sneaking into women’s bathrooms under this policy.

I don’t think gays and transgenders should be discriminated against, but I don’t have to agree with the gay life style. I personally think it is morally wrong. But what I think is totally crazy is this non-binary crap. I read that there are 58 different sexes in the Democratic Party new world order. Seriously? And we aren’t supposed to use “he” or “she” anymore, but use “ze” instead. At least, that’s what Oxford University’s students want. This is so ridiculous that I’m not even going to comment on it further.

And yet, the Democratic Party has made this a major issue for the party. Really? These are our priorities? What about jobs, health care, and, terrorism? Does “which bathroom you can use” supersede those issues? To the new Democratic Party it appears to. Not to me.

Some Live Don’t Matter?

All Lives Matter

I agree that black lives matter, but I don’t agree with their methods. I ALSO believe that blue lives matter (our police), and EVEN MORE, ALL LIVES MATTER. I am so sick of the Democratic Party pandering to minorities and LGBT for votes. You can’t even say “All Lives Matter” without being shouted down.

The double standard in America is amazing. Things that would get a white male fired or arrested, go unpunished, or are even encouraged by minorities or blacks. A gaming company that I used to love, Bioware, has been infiltrated with a number of racists. One, such employee, Manveer Heir, hates whites, and openly tweets that he wants to kill white people and urinate on their corpses.

If I ever came close to saying anything like that about a minority, I would be fired immediately (rightly so). And yet, Bioware (owned by Electronic Arts) didn’t even make a public statement about his comments, and he remains employed, spouting his hate speech.

Enough With The Identity Politics!

Frankly, as much as the new Democratic Party states they are not racist, they are extremely racist. They are just racist towards white people. I guess we no longer count. Fine, you don’t have to like whites, but don’t get all surprised when we no longer vote for you.

I am totally in favor of extreme vetting of Muslim immigrants. The travel ban is even widely supported by Muslim countries in the Middle East. I am all for religious freedom, but I have have an issue with a religion whose stated goal is that you either join us, or we will kill you.

What About Protecting America?

American Flag

I do not understand why Christianity is being suppressed in this country, while we allow the most egregious Muslim actions to go on without comment. I especially don’t understand why women are so supportive of Muslims, given how they treat their women. Women in Saudi Arabia can’t drive a car. Women in Saudi Arabia cannot even go into a Starbucks to buy a cup of coffee. Gays are executed in many Muslim countries.

I also don’t agree with the illegal immigration that is being allowed to continue in the USA. Not only is this costing American jobs, but even repeat criminals are not being deported. I’m sorry, I am totally in support of the wall President Trump wants to build.

Democrats: Minus One Vote

Vote

I admit that I voted for President Trump reluctantly, but I am also willing to admit that he has exceeded my expectations in all areas. It is so refreshing to see a president who isn’t beholden to either party, and who actually get things done, and does what he promises! I give President Trump a grade of A+++ so far.

I’m not normally a political person, but the behavior of the Democratic Party during and after this election has been so atrocious, I had to vent. They have lost me as a supporter, at least until I see a major return to normalcy by the Democratic Party. For now, their primary platform appears to be rioting, violence, shutting down open discussion, attempting to subvert the U.S. Constitution, and racism against whites. Oh, and allowing males in women’s bathrooms. Sheesh.

17 Year Cicadas Invade Northeast Ohio!

17 Year Cicadas are here!

It looks like 2016 is the year of the locust in Northeast Ohio! Well, actually, it’s the year of the 17 year cicadas. I remember them from when I was a kid, and back then we called them the 17 year locusts. I do remember them being everywhere, with their shells literally covering the ground like a carpet in places.

I’ve lived out of state until recently, but it looks like I returned to Ohio at the right time, because we have been invaded by Cicadas.

The first thing I noticed was small finger-sized holes all over the ground. I had heard we were supposed to be getting the cicadas this year, so I did some Googling to confirm it.

The Life of the 17 Year Cicadas

I learned that the Cicadas start out life as eggs laid on the limbs of a tree. When the eggs hatch, the white cicada young will feast on the fluids from the tree. This often causes some damage to the tree. Perhaps it is because of this damage that people often refer to then as locusts, even though they are actually in the cricket family.

When they have matured sufficiently, the cicadas drop to the ground. Then, they burrow into the ground to find some roots to feast on. They will stay underground for 17 years tunneling and feeding off of roots.

After 17 years they will emerge when the right conditions are met. This is usually when the soil temperatures reach 64 degrees Fahrenheit at a depth of 8 inches.

The holes shown in the picture are the exit holes they have dug to begin their adult life above ground. After they emerge, they shed their exoskeleton. These are the shells that litter the ground below trees. I’ve also seen a large number of the shells still attached to tree leaves.

Once they shed their exoskeleton, they begin their brief two week life as an adult, looking for a mate to repeat the cycle. The loud noise is made by the males trying to attract a mate. An individual cicada can reach 110 decibels if heard near your ear. I can say that at times, the sound in my neighborhood is almost at the painful level. There is strength in numbers, and cicada populations can reach 1.5 million per square acre!

Cicada Song

Why 17 Years?

There doesn’t seem to be a definitive answer to why they have the 17 year cycle. One theory is that because they have no defensive mechanisms that they appear en masse so they can survive attacks by predators. The 17 year cycle is presumed to prevent the predator population to swell because of the extra food they provide in the year they emerge. After 17 years without the extra cicada to feast on, the predator population will have presumably returned to normal size.

I can say, that even though they don’t bite, they get annoying after a week or two. They have a bad habit of confusing you for trees and landing on you. When you brush them off, they make a loud screeching sound. The first time one landed on the back of my neck and I brushed it off, the shrieking scared me half to death.

The sound of the cicadas seem to be on the decline, so I suspect the population is dropping now. They are expected to be gone by the first week in July.

Photo Gallery

References

Here are some sites that have everything you ever wanted to know about cicadas, and more.

Apple Abandons iAd, Unexpected Benefits for Google

Apple Inc. has announced that it is abandoning support for iAd on June 30, 2016. Developers will continue to earn revenue until that date. After that date, Apple will stop serving ads, and will provide a final payout of earnings to developers in September of 2016.

iAd was Apple’s mobile advertising platform for iOS devices like iPhone and iPad. Developers could incorporate simple iOS API’s in their mobile applications, and have ads served up by Apple. Developers received a share of the revenue produced by the ads with Apple.

According to Apple, the API’s are being deprecated, but should not cause developer’s applications to crash. Ads will simply stop being served.

Apple’s original announcement in January was very brief and did not make it clear if the API’s would serve ads from third parties. It did not seem clear from the initial posts that the change would affect developers. It sounded like iAd would still present third party ads, but that Apple was getting out of the business of soliciting and selling ads directly.

More recent posts from Apple have made it clear that this is not the case, and the API’s will no longer serve up ads, and that the API’s have, in fact, been deprecated.

Why is Apple Doing This?

Apple has apparently been unable to grow its market share in the mobile advertising business from around the 5% level, in spite of the fact that the iOS platform accounts for more than half of the mobile advertising market. In fact, it is reported that 75% of Google’s mobile ad earnings come from the iOS market.

There has been speculation that Apple, unable to grow its market share, in spite of the flourishing ad market for iOS, has decided on a new ad-free strategy, as a way to counter Google.

Consequences for Apple?

Whatever the reason, I think this is a mistake for Apple. Even if iAd was losing money, which I’m not sure it was, it is a drop in the bucket for Apple. iAd was, however, a very simple means of monetizing apps for developers, and the ads were served in a customer-friendly way.

It was a way to make the iOS platform more favorable to developers. It kept the developer in the Apple ecosystem.

Now those developers will seek a new ad platform. Most likely, it will be Google AdMob, since it is the leader in that space. Now, that ad revenue is going to one of their biggest competitors. And developers are being exposed to a small part of the Google ecosystem. That may be the “foot in the door” for Google to get those iOS-exclusive developers to finally make the jump to also support Android. It is certainly making me revisit this question.

Automated Plant Watering Using Raspberry Pi

I love house plants, but I can’t seem to keep them alive. I decided to utilize a Raspberry Pi to monitor soil moisture and re-water the plant automatically, sending alerts when the water reservoir is empty, and providing a web service that updates my home page with the latest photo (hourly).

I wanted to make this as automated as possible.  Utilizing the all-knowing Google, I have scoured the web and pieced together this Rube Goldberg device. Here’s a diagram of the basic layout:

How it’s built:

The heart of the system is a Raspberry Pi 2 Model B.  This is an amazing computer about the size of a pack of cards that only costs $35. It packs some amazing features for that price:

  • Broadcom BCM2836 ARMv7 Quad Core (900mhz)
  • 4 USB ports
  • 40 GPIO pins
  • Full HDMI port
  • Ethernet port
  • 3.5mm audio jack and composite video
  • Camera interface (CSI)
  • Display interface (DSI)
  • Micro SD card slot
  • VideoCore IV 3D graphics core

To start with, I needed to detect the moisture level so that I could determine when the plant needs watering. For this, I connected an Arduino compatible High Sensitivity Moisture Sensor. This provides an analog voltage representing the soil moisture, so it has to be converted to a digital value for use on the Raspberry Pi.

To convert the analog voltage to a digital value, I used an Adafruit 8 Channel 10 Bit Analog ADC for Raspberry Pi. This can be connected directly to the sensor and Raspberry Pi. I’ve just used a breadboard for this, but I’ll probably create a more permanent solution later.

Next, I needed a way to automatically water the plant. I needed to pump water from a reservoir whenever the plant moisture level dropped too low. I found an inexpensive pump on Amazon (Lightobject EWP-DC30A1230 Mini DC Brushless Submersible Water Pump), but I needed a way to control it from the Raspberry Pi. For that, I added a relay (SunFounder 2 Channel 5V Relay Shield Module).

I wanted to make sure that the water couldn’t overflow the plant onto the carpeting. My solution was to use a deep saucer under the plant that not only catches the excess when the plant is watered, but also serves as the reservoir for the pump. In this way, even if the pump continuously runs, the water pumped will be safely returned to the reservoir. I also decided to just use a 9v battery as the power source for the pump, so it would not be able to run indefinitely in case of a malfunction.

Finally, I needed a way to check the water level of the reservoir. So, I added another Moisture sensor and used another channel on the A/D converter to monitor that from the Pi.

I added the Pi camera so I could monitor my plant and view its beauty from anywhere on the web. (picture is updated hourly, between the hours of 8:00 AM and 5:00 PM)

For the final step, I linked the Pi to my web site, so I could view the plant, and see the latest watering information:

Actual Device

This is a a picture of the actual construction. Everything is just connected via a breadboard, for now.

How It Works

To start with, I don’t like Python, which is the de facto standard language on the Pi. The indentation rules are just wrong. My opinion. But since my Pi runs Raspian (a Linux version based on Debian), it runs a C compiler just fine. So, C it is.

I wrote a daemon which starts at boot time to control the whole system. Every hour it checks the moisture level in the plant, and the level of the reservoir. If the plant needs watering, it turns on the relay for a few seconds so the pump will water the plant. If the reservoir is empty or low, it will send me an email so that I know to refill it. At the same time, it takes a picture of the plant to record its current state.

I also wanted a way to monitor my one-plant garden from the web. Since the Pi runs Linux, I was able to install an Apache web server and PHP on the Pi. I wrote a REST service to return the watering status as a JSON string. I opened a port on my router to forward the web service requests to my Pi.

My web site, which runs ASP.NET and is written in C#, calls this REST service to get the latest watering information, which it displays on the web site, along with the latest plant picture from the Pi camera.

Sample Log Entries:

It remains to be seen if all of this technology can succeed in keeping my plant alive. I have a pretty good track record of killing houseplants (unintentionally). I’m crossing my fingers.

Update: Sep 3, 2015

Electrolysis has taken its toll on the Arduino sensor. The voltage level started dropping quickly, due to the corrosion of the probes. I’ve attached a picture showing the damage:

So I’ve scoured the web for a cheaper and easier to maintain solution, and came up with this. It is comprised of two galvanized nails, separated by a Styrofoam block, connected to the ADC with a 10k Ohm resistor in series on the ground wire. So far it seems to be working well. I’ve attached the leads to the nails by alligator clips, so when they corrode, I can simply insert new nails into the Styrofoam, and reattach the clips. Here’s a picture of the new sensor: