A problem with binary

Confusion arose when the lights turned on when they were supposed to be off and lit the room blue.

The LED was connected to pin 18 of the gpio and given an on pulse. But nothing interesting happened. When the off signal was given, the LED started off.

Upon investigating the problem in the strange waters of the internet, there were a lot of confusing answers and I realized the fact that a basic understanding of how LEDs and gpio works was essential.

GPIO input/output pin works by sending a 1 for on pulse and a 0 for off pulse. 1 represents sourcing and 0 represents sinking current. So 1 doesn’t necessarily mean turning the connected device on. It just means a current is sourced.

If the anode of the LED is connected to the I/O port the port can provide only a 12mA current source. This means th LED doesn’t have enough current.

But if the cathode was connected to I/O instead, and the anode to the 3V supply, (more than 20 mA) full brightness can be reached but the configuration is inverted and LED turns on, when the 0 pulse is given and off when the 1 pulse is given.

The best way to adress this boggling issue is to change the configuration in the code from 1 for on, to 0 for on. Although this sounds like a workaraound, truth is, no one cares how it works and just wants to see that light glow

Internet protocols

Therw are two protocols for internet traffic.

TCP(transmission control protocol) is the safe and secure protocol. It engages a three way handshake with the recipient. The first phase is the SYN(chronous) where it establishes and verifies connection with the neighbour. The second phase is the SYN ack(synchronous acknowledgement) where the recipient computer ensures connection. The third phase is acknowledgement when the sender computer acknowledges the SYN ack and starts sending data. This method is slow and takes a lot of bandwidth but is extremely secure. If there is a loss of data packet, TCP asks the sender to resend that particular packet

But, UDP is all about dat speed. It doesn’t even verify SYN, but keeps on sending packets without any concern for the recieving computer. The advantage is it’s high speed and bandwidth.

Personally, I prefer UDP, because loss or frame has a very low probability of occouring and ofc everyone prefers fast over secure

perms and the blinds

Solving the Rubik’s cube sub-one minute is cool, solving it sub five is probably overkill. But solving it blindfolded is a whole another story. It isn’t hard or anything until you reach the world of parity. Let’s get some basics straight

Lets forget orientation for this one and focus on permutation. From the permutation groups field in mathematics, the edges and corners of a rubiks cube can only be shuffled around in odd numbered groups(excluding one, because you can’t switch a single piece, duh).

The problem arises when two edges and two corners are switched. This occours in 50 percent of solves. Speaking plainly the parity inverses itself for single turn of any face of the cube.

But, don’t turn that face too fast because remembering cube positions is hard enough without having to calculate ten different transitions in blindfold solve. Common algorithms can switch only 3 edges or corners. Thats when the T perm comes in. The cool algorithm swaps edges 2-3 and corners 2-3. Its a leap akin to an ant moving into the third dimension (and thereby solving string theory).

This means that any algorithm that swaps even numbered pieces is a permutation parity solver. The other perms like J perm and F perm look more appealing than the T perm but as far as solving the parity goes, only one face rotation is enough, as long as you don’t have that blindfold on.

Hard not tough

I was always confident that diamonds can be broken with a hammer. But my world was shattered when a guy hit a diamond with a hammer and it made a dent on the anvil. A few seconds later the same guy broke it with a comparitively powerless hit. There was definitely something shiny here.

To understand what was going on I had to understand the difference between hardness and toughness.

Hardness is the material’s resistance towards plastic deformation

Toughness is the material’s ability to absorb energy without shattering.

Diamond is extremely hard but not tough enough. You can scratch any surface with diamond but diamond breaks when enough force is applied.

But what about the dent on the anvil? That arises from the fact that the crystal structure has various planar surfaces. Of these planes some split without much energy and others require a lot of energy. Hence,hitting a diamond on its octahedral plane beaks it with a clean cut but on other angles it doesn’t, and dents stuff.

Fun fact, due to its extremely clean cut faces, the diamond face is hydrophobic(doesn’t let water stick) and lipophilic(lets oil stick).

Now that is some crazy physics.

Select stuff the lazy way (in edit mode)

The most annoying thing i had to do in blender was selecting every single edge or corner by myself. Not a hard thing when wwhat you’re designing is small but when its got like 4 subdivision modifiers stuff becomes hard.

So, to select rows of edges or corners that are not even linked but are on the same line, use ctrl + alt + left click

To select alternates from anything you’ve got selected go to the select panel and click checker deselct

Then to select every other linked edge select the edge loops option in select menu.

To select similar stuff, use the select similar option(surprise! surprise!)

This is a great way to select any orientation or edge piece of a heavily subdivided plane on your model

I wish i could remember this, but writing it down seems to etch it to the skull.

The Stuff That leaves forever

There are certain things that will always come back to haunt you for forgetting them.Such things are quite interesting and are from too niche of a field to be found with a simple search. it seems there are things to be found out everyday. so this is a collection of what I have loved and left my mind blown. Mostly engineering breakthroughs or a creative way to edit stuff in blender and some shortcuts for editing software. this is also an endeavour in improving my memory.