Reactive TV Lights

Ambilight just too expensive or not cutting it for you? Same. I did it myself, and like most of my projects it involves a Raspberry Pi.

Here’s what you’ll need for my setup:

  • Raspberry Pi 4B
  • Pimoroni Mote LED Kit
  • 4K HDMI Splitter
  • HDMI-to-USB 3.0 Capture Card
  • Lots of USB outlets and cables, some included and some not.

I used HyperBian, which is basically Raspbian pre-flashed with Hyperion. This handy image does 90% of the work, so take a moment to appreciate how much you don’t have to do.

Note: Python 2.x has been deprecated and I have therefore updated the scripts/syntax to reflected that as needed.

I’m not gonna mention the parts that are standard, like setting up Mote lights. I will go over the wiring though:

Media > Splitter > HDMI Capture Card > Pi > TV

First, follow these instructions. I’ve listed the relevant portions below as well.

sudo apt-get install python3-dev python3-pip
sudo pip3 install twisted
sudo pip3 install pyserial mote numpygit clone
cd artnet-unicorn-hat
sudo nano artnet-server.service
sudo cp artnet-unicorn-hat-mote/artnet-server.service
sudo systemctl enable artnet-server
sudo systemctl start artnet-server

Before copying over artnet-server.service, modify it with nano, make sure the path to the script matches where it is on your installation.

For me, I had to change the user folder from “osmc” to “pi”. If you try to start or enable the service you’ll probably get the following error:

Description = Artnet/OPC/FadeCandy Server - control of LEDs

Type = idle
ExecStart = /usr/bin/python3 /home/osmc/

WantedBy =

Original error was: cannot open shared object file: No such file or directory.

This can be easily fixed by running the following command:

sudo apt-get install libatlas-base-dev

Go to Hyperion Dashboard. It should be localhost:8090 from your Pi. Set the Capture Input to the USB device detected (the capture card), and the LED output format to “fadecandy”. Set the number of pixels to “64”. Save the settings and everything should work! Don’t forget to configure your lighting orientation to match the placement of your lights!

Build an Autonomous Unmanned Aerial Vehicle

Earlier this year, I set my heart on building a drone that can fly itself. I know I’m not the best pilot, so I wanted something that could more-or-less take care of things on its own. It was (and is) a very long road, which started with me buying a Raspberry Pi 4B.

Since then, I’ve constructed a vehicle that can hold an extremely steady position a few feet above the ground. That’s about the extent of its autopilot so far, but that is a remarkable thing in itself. Your standard remote-control quadcopters may be able to “stabilize” themselves in the air, but they have no idea where they are in relation to the world around them and therefore can’t “stand still”. If the wind blows them, they’ll drift unless the pilot intervenes. It may sound like a small difference but it’s much more substantial when you’re working with precise movement in an area full of obstacles.

Let me also take a moment to say that if anyone reading this is encountering issues with any of the parts or workflows mentioned below, leave a comment and I’ll be happy to help out. So, let me list off the salient components of my project (which I’ve christened W.A.T.N.E. — in honour of the character Mark Watney from the novel The Martian by Andy Weir.

  • The Frame – DJI Flame Wheel F450 ARF Kit. It came with motors, electronic speed controllers (ESCs), a sturdy set of arms, and a top plate + bottom plate.
  • The Flight Controller – Navio2. Most people opt to buy a standalone FC and connect a “companion computer” (usually an SBC like a Raspberry Pi or Nvidia Jetson Nano) over UART. I operated through the path of least resistance and got what I knew best: a Raspberry Pi Hat. RPi Hats are basically daughter boards that connect to the GPIO pins on the Pi and give it extended functionality. In this case, it’s giving my model 4B the capability to be an integrated 2-in-1 flight controller and Linux companion computer. I’ll talk more about the implications of that later, but please do read what I have to say before you invest in a Navio2 or any other FC that runs off the Linux stack.
  • Cellular Uplink: Netgear 340U USB LTE Modem. A rare find and a royal pain to configure for Linux, but I got there in the end.
  • Tracking: Intel RealSense T265 Tracking Camera. (Tests are underway to implement this device for precision landing.)
  • Obstacle Avoidance: Intel RealSense D435i Depth Camera.
  • Intelligent Object Recognition: Intel Neural Compute Stick 2 (not currently set up).
  • Radio Receiver: FrSky R9
  • Radio Transmitter: FrSky Taranis Lite with R9M ACCESS (long-range module).
  • FrSky SBEC
  • PiJuice UPS/Power Management Hat
  • 4S Li-Po High-Discharge Power Cell
  • Lots of cables, wires, connectors, Flex Tape, and hair ties.

I’ll be honest with you, I had little to no clue what I was doing when I started. My dad, who is an Internet Pioneer that founded this blog several years before my birth, raised me with an intermediate understanding of computers. However, this was hitherto my first foray into the world of UNIX commands. I familiarized myself with syntax by messing around with online examples aimed at kids. Like most things, you’ll find that the most intuitive way to learn coding is with the materials aimed at kids. I started off with Scratch by MIT just a few months after its release over a decade and a half ago.

When I thought I was ready to take on the big project (I was woefully misguided, but if I had known what I was in for I may not have started at all), I ordered the frame kit. That was my big initial commitment to the project. Assembling it was easy enough, once I got used to the soldering iron. You only need it for fusing the ESC cables to the bottom-plate. Pretty much everything else is plug-in if you play your cards right.

It’s not hard to build a quadcopter. We live in a blessed era of over-information, we need only have the skill to discern the pertinent from the irrelevant.

  1. Flash an SD card with Emlid Raspbian. You’re stuck with their distro because the Navio2 needs a custom kernel.
  2. Assemble the frame kit. Only put the propellers on when you’re ready to fly it but make sure you know which props go on which motors.
  3. Assemble your Big Brain Module, in my case it’s a Pi and two hats. Oh, and put that SD card in there too.
  4. Connect the ESC wires to the servo rail, and the Navio2 Power Module to the port on the back-right corner of the FC. WARNING: I hate to be the guy to tell you that the boogeyman is gonna get you if you don’t eat your vegetables, but if you don’t follow the wiring diagram exactly, your drone will keep flipping when you try to take off and you’ll never know why. Trust me.
  5. Connect the power module to the flight battery. I mean, you can do it just to make sure power goes through it but all the motors will do is beep at you in a distressed fashion until it gets a data input. Maybe just leave it disconnected for now.
  6. Connect the power module to the bottom-plate. I use XT60 connectors and I had to solder an XT60 connector to my bottom-plate for the power running to the motors.
  7. Connect the radio to the port on the servo rail marked “1”. it’s the column of pins reserved for the only radio so don’t put your motors or anything else there.

That’s it for hardware, assuming everything was done right the first time. A lot of this stuff is trial and error, as it has been since time immemorial. Remember that everything you do is a result of the culmination of thousands of years of societal and technological research and infrastructure. We stand on the shoulders of giants, all of us. We are nothing without the efforts of our predecessors and keeping that in mind seems to temper me when my patience runs thin.

So far, I’ve described how to build something theoretically capable of flight. There’s not much to do software-wise, just some basic calibration done through the ground control application. I use QGroundControl but if you use Windows I’ve heard Mission Planner is way better.

If you configured everything right, you have yourself a remote control quadcopter. It should arm in stabilize mode even without a GPS lock (don’t get me started on GPS just yet).

In the next post I’ll go over all the tweaks and tricks I’ve done to make it do more than just be an RC toy.

Good vs. Evil

To understand morality, a baseline must be established. Humans in their natural state are neither good nor evil, but that doesn’t mean that “regular humans” wouldn’t perceive some of those neutral actions as ‘evil’. For example, a toddler in kindergarten who has not been taught manners will take toys from another child without asking, as this is the way of the wild. People would interpret the action of “stealing” the toy as evil, but that is just because they have already been conditioned by society. The alpha-wolf gets to eat first because it is stronger. It is capable of taking the food from the weaker wolves. Toddlers are, in a way, animals. If left to their own devices without intervention from authority figures, toddlers will eventually form a hierarchy of sorts, the strongest child having all the toys and food it wants. On another hand, primates kept in captivity have shown signs of humanity after being surrounded by “properly conditioned”, normal humans. Wolves are not evil for asserting dominance based on strength, nor can unconditioned humans be considered so. Upbringing is the conditioning humans go through. During the upbringing, basic moral grounds are set. The conscience is brought about, and children are taught fundamental differences between right and wrong. Studies have shown that the conscience and all moral thought is cemented before the age of five. If a child is not taught the fundamental differences between right and wrong during that time, they will be generally considered evil by society.

How, then, can one truly tell what is good and just? Steve Taylor, Ph.D. defines it as “‘a lack of self-centeredness. It means the ability to empathize with other people, to feel compassion for them, and to put their needs before your own. It means, if necessary, sacrificing your own wellbeing for the sake of others’. It means benevolence, altruism and selflessness, and self-sacrifice towards a greater cause – all qualities which stem from a sense of empathy. It means being able to see beyond the superficial difference of race, gender, or nationality and relate to a common human essence beneath them.” (Taylor) Continuing on Dr. Taylor’s train of thought, the character known as the Doctor from the TV series Doctor Who recently said, “hate is always foolish, and love is always wise.” (Moffat)

Taylor, Steve. “The Real Meaning of ‘Good’ and ‘Evil’.” 2013. Psychology Today.

Does God Exist?

Does God exist? As long as the concept of an omniscient and omnipotent overlord has existed, the human race has asked the question: “Does God exist?” It can be argued that this is the oldest question in the universe. However, I disagree. I think the oldest question in the universe (or at the very least, the first question that any being would ask as soon as they are capable of thinking) is “why?” This question can be found at the root of every science, philosophy, art, and religion. It is the explanation for the modern interpretation of God. In The City of the Shadow Realm – a novella I wrote – an ethereal character states, Religion is a construct of the human mind that was designed to help them cope with their fast-growing intelligence. Thousands of years ago, when humans were beginning their climb in the scale of knowledge, they started to ask too many questions to which they were unable to acquire answers for. They invented religion to explain away phenomenon they couldn’t grasp. (Bajaj, 2016)

As I stated, the “God” many religions have come to accept does not exist. It was and is an explanation to something beyond limited human understanding. The Greeks were one of the first recorded civilizations to practice religion. They believed that Zeus was responsible for thunderstorms, and Poseidon caused tsunamis. They invoked the name of Ares when going to war, and blamed Aphrodite for love. For every phenomenon they did not understand – every time they asked “why?” to an unanswerable question – there was a God to explain it. This, in my opinion, was nothing more than a fallacy they told themselves, because human nature cannot handle a question without an answer. I would not go so far as to say that there is nothing beyond death, and I still believe there is some form of transcendent energy that controls the universe. However, I do not think there is a corporeal, sentient, or even conscious God as depicted in Christianity, Islam, Judaism, etc. I believe God is energy, a primordial spiritual power that exists beyond time and space. God is a law of nature, and is nature itself. God exists to be called upon by the beings of the universe. In The Secret by Rhonda Byrne, the Law of Attraction is elaborated upon, described as energy in the universe. Byrne states that “Your power is in your thoughts, so stay awake. In other words, remember to remember.” (Byrne, 2006)

To paraphrase: our thoughts create reality. We can imagine our lives the way we want them to be, and it will happen. Is this not how God is commonly thought of? People go to places like churches, mosques, synagogues, temples, and shrines to pray: asking their God for the things they want and need. In my opinion, there is God in all of us. Every being that has ever lived has had God inside them. This is because God is thought, and thought is God. People do not need to go anywhere or pray to any specific being to ask of the energy we call God. However, one should not ask for anything. If you ask for something, it means two things: you do not have what you are asking for, and you are not showing your gratefulness for what you have.

When you want to attract something into your life, make sure your actions don’t contradict your desires. Think about what you have asked for, and make sure that your actions are mirroring what you expect to receive, and that they’re not contradicting what you‘ve asked for. Act as if you are receiving it. Do exactly what you would do if you were receiving it today, and take actions in your life to reflect that powerful expectation. Make room to receive your desires, and as you do, you are sending out that powerful signal of expectation. (Byrne, 2006)

So, am I an athiest because I don’t believe in a God? Or am I a thiest because I believe in some manner of higher power? It is not as simple as that; I would define myself as an agnostic non-deistic thiest. That is to say, I believe in a God (I am a thiest), I do not believe that God is a deity (non-deistic), but I’m not one hundred percent sure of my beliefs, and I accept that fact I could be wrong (agnostic). To conclude: I believe in a God, but not in the traditional sense.

Works Cited
Bajaj, Satraj Singh. The City of the Shadow Realm. 0.4. Vol. 1. Toronto, 2016.
Brietbart, Peter. Atheist, Gnostic, Theist, Agnostic. 2009.
Byrne, Rhonda. The Secret. Ed. Rhonda Byrne. Beyond Words Publishing, 2006.

Is Knowledge Detrimental?

When people ask the question “can knowledge be detrimental”, I always think about how ironic that is. If knowledge really is detrimental, then even the knowledge of that is detrimental. It isn’t as simple as that, however. There is a saying: “ignorance is bliss”, and to an extent, that is true. For example, if someone is bad at keeping secrets, then they shouldn’t know something of a sensitive nature. The secret-keeper will feel burdened by the secret, and the secret-giver will be hurt if the secret is revealed. The secret might be for the benefit of a third party, who will also be hurt if the secret is revealed.

In the popular anime/manga series Attack on Titan, humanity lives within a walled city surrounded by man-eating giants known as Titans. The residents of the wall have been living there for a mere century, but believe that they have been there for much longer. Furthermore, they believe themselves to be the last of humanity and completely isolated. They don’t know, however, that they are merely on an island off the coast of Marley, a country who they (the island of Eldia) lost a war to 100 years ago. The king of Eldia modified the memories of the Eldians and marooned them on the island, completely isolating them from those who would seek to harm them. The king obviously thought that the knowledge of a world beyond the walls would be detrimental to the people of Eldia, so he shrouded his citizens in blissful ignorance.

Another example would be the series of novels written by Jeanne DuPrau; specifically, The City of Ember. Ember is a city located deep underground the Earth, hidden away and populated by people who were raised not knowing there is a world beyond the cave in which they dwell. The City of Ember was created by the Government as a contingency plan for human survival, in the event that the impending nuclear war would wipe out the rest of the population. The first generation of Emberites were instructed to raise their children to know nothing of the world above, so that they would not try to surface from their safe underground dwelling prematurely. Once again, the government officers in charge of the Ember project decided that knowledge would indeed be detrimental.

However, in both of these examples, there was a flaw in the plan. In Attack on Titan, the Marleyans sent undercover soldiers to destroy the walls of the city and let in the man-eating Titans. The Eldians were blindsided and massacred, not prepared for an attack and unaware of what to do. If they had known about Marley, they’d have been able to expect an attack and prepared. In The City of Ember, the time capsule (containing instructions on how to exit Ember and knowledge of the world above) set to automatically open well before the Ember supply stores ran out, was misplaced and not found for hundreds of years later. The lack of knowledge put the entire population of Ember at risk. The city was on the brink of electrical failure (which would plunge them into absolute, deadening darkness) and their food supply war running low. It was a fluke that the protagonists found the capsule and led the city out of the long-past-due-to-fail Ember.

In conclusion, knowledge can be detrimental, but one must consider the implications of ignorance too, which can be equally harmful.

Sexism Still Exists

“The women’s liberation movement is not really a liberation movement. It is in fact just the opposite: it is trying to imitate man, to become as hard as men are, to do whatsoever men are doing. And remember one thing: if women try to imitate men they will always be carbon copies; they will not attain to their fulfillment, they will not attain the full potential. And they will always remain lagging behind. And they will become ugly too! The real liberation movement has not started yet. The real liberation movement will insist that the woman has to be more and more feminine, that she has to be rooted in HER nature, that she is not to follow men in retaliation, in reaction, in rebellion – that is stupid. No reaction ever helps. The woman has to be herself.’
— Osho, The Fish in the Sea is Not Thirsty

Not many people consciously realize that societal values have over the past few decades resulted in become increasingly oppressive of men. Men’s rights have been stifled in the pursuit of women’s rights, at least in first world countries – but to an extent in third world countries as well. Neither men nor women are, or ever can be, superior to the other, and therefore it is essential that both genders liberate themselves to be who they are without the need to prove superiority over the other.

Some Feminists have been pretending that their goal is to abolish all gender discrimination and differences – no matter how reasonable. The reality is, that this type of feminist isn’t really a true feminist at all! They are out to punish men, guilty or innocent. They routinely make domestic violence accusations just to get even, with no burden of proof or prosecution for perjury, and accused men are neither accorded due process nor considered innocent until proven guilty despite their reputations, jobs and money being at stake.

Both women and men seek empowerment, and both have at some point, believed to have it. However, true empowerment is giving yourself the permission to be who you are without hubris or ego, without the need to prove something to yourself or others around you.

The unfortunate reality is that a large proportion of women, citing patriarchy and oppression by men, as a weapon of covert emotional abuse, guilt men into submission so they can dominate and ill-treat them on an ongoing basis. They even taunt men with sexist clever remarks like, “Age – few women admit theirs and few men act theirs”.

Men are ordinarily considered to be at fault due to their physical characteristics; and these pseudo-feminists leverage such gender profiling by dictating that men are naturally oppressors and women are naturally victims. All women are acutely aware of this societal advantage, whether they choose to take advantage of it depends on their definition of right and wrong. The knowledge of this is passed on to future generations through the school system. For example, while violence by a girl towards a boy is often overlooked, never is violence by a boy against a girl condoned, and with no heed to the physical characteristics of such boy and girl, especially considering that in school boys and girls are at vastly varying stages of growth and development and as such it is very common to find girls who are bigger and stronger than many boys. An example of this is when I was in the seventh grade. I was walking around during lunch and a ninth grade girl who was significantly stronger and taller than me, approached me and swung me upside-down by my feet. She proceeded to kick and punch me repeatedly, just for the savage pleasure of it. When I managed to get a foot freed, I kicked her and ran away as she dropped me. An hour later, I was called to the principal’s office and reprimanded for hitting a girl! Where is the logic!?

Similarly, if a woman were to slap a man in public, other women would likely cheer her, and men might say he asked for it. If genders were reversed, other women would be appalled and protest, likely report to the police and a chivalrous man would step in to protect the woman. Why the difference? Society has men convinced that they are always the ones at fault, which is a form of emotional abuse; they believe that the man deserved it, whereas women as a collective look out for each other.

Another example is, if a woman were to tell her friends that she is the one that cooks and cleans, her friends would think that she was being horribly oppressed and they would tell her so, perhaps offering to confront her husband. Conversely if she mentions that her husband does all of that for her, her friends would say, “He really loves you”.

The sexist double standards of modern society are evidently in reverse. We have yet to reach true equality, and I fear it may not happen for a very long time. What we can do is try our best to treat everyone truly equal. We need to let go of social norms, societal values, prejudices and stereotypes to reach for a society where people can live in peace, equality and harmony.

Works Cited:

Posts by Gary Bajaj