DEV Community

Cover image for How I fixed my bad typing with a taser
nobody5050
nobody5050

Posted on • Updated on

How I fixed my bad typing with a taser

Yep you read the title correctly... I used a taser to fix my typing and here’s how.

Part 1: Why? Why would you do that?

About a month ago I started to notice my typing speed was being slowed down by needing to make corrections in nearly every word. This obviously needed to change, so I devised a plan.

Part 2: The plan.

The plan was simple.

  • Step 1: Detect typos. In Order to improve my misspellings, we first need to figure out when they’re happening.
  • Step 2: Reprimand user Once we’ve detected a typo, we need to trigger the taser, to help make sure I won’t do it again.
  • Step 3: No more typos! Hopefully when I get teased I’ll make less typos.

Part 3: The software

In order to detect the typos I threw together a simple website which generates a random English word, and then prompts me to type it.

But how does it work?

Well the code is actually really simple.

The code first grabs the content of a json file I got from here:

GitHub logo dwyl / english-words

📝 A text file containing 479k English words for all your dictionary/word-based projects e.g: auto-completion / autosuggestion

After that it picks a random key, and sets the

element’s content to the word.

Lastly I need to make sure the user is typing the provided word correctly.

That code is a really simple function, all it does is check if you’re typing the word correctly and if not it calls a function called turnOn() which triggers the taser.

Part 4: The hardware.

Now the fun part!

To handle the taser circuit I’m just going to use some prank shock gum I found on Amazon, it’s a pretty mild shock.

This is good for two reasons, 1: if I mess up I’m not going to electrocute myself, and 2: if I mess up I’m not going to fry any of my electronics.

But how will I interface the website with the hardware?

Let me introduce, the particle argon!

Particle Photo

This is an Arduino compatible board, with cloud connectivity over WiFi. You can control individual pins over the air, just by pinging an API

So I’m going to use a circuit like this to open and close the taser switch via the particle:
Alt Text

Now that that’s done it’s time for

Part 5: Testing!

It works!

So yeah it works! If you liked this post you’ll probably like my previous project:

Thanks for reading!

Top comments (4)

Collapse
 
raddevus profile image
raddevus

Looks like a similar system has already been built. 😆🤓
error correcting system wumo comic
From WuMo comic : gocomics.com/wumo/2014/11/19

Collapse
 
trueneu profile image
Pavel Gurkov

Nice! Would next step be to implement all the traps from Home Alone?

Collapse
 
miko1112 profile image
miko1112

Michael Reeves 2.0

Collapse
 
alvarito050506 profile image
Álvaro Torralba

Ok, now we should be worried xD