Turn off monitor - C++

monitor%20off.png
My brother asked me how can he turn off the monitor. He showed me a PowerShell script

start powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2); exit

My reaction was “what the heck, seriously you can do that with PowerShel, like, invoke a function in a DLL file just like that?!”.
[Read More…]

 

Programmatically upload code - atmega32u4 - VC++

m32u4_prog_intro.jpg I had a small project that need to deliver firmware for atmega32u4 for my customers. And of course, they aren’t tech-savvy like me. It was impossible to guide them to use arduino to flash directly using source code. More importantly, I don’t want to share my source code. There is only one option for me that build an avrdude wrapper that detect atmega32u4 and run avrdude automatically. This tutorial is about uploading firmware to atmega32u4 programmatically using AVR109 app note in Visual Studio.
[Read More…]

 

PC watercooler - arduino water flow status

intro.jpg Watercooling system on your desktop PC is kind of look cool. But of course, it concerns a lot of precautions.

Water tight
First of all, make sure it is water tight, meaning no leaking at all. You never know if your watercooling is leaking. It happened to me, twice, in the past about 14 years ago. You know, water and electricity they don’t like each other. A few drops of water on motherboard or video card could result in tragedy.

The picture on the left is just click-bait. It’s not mine, it’s from Thermaltake advertisement

[Read More…]

 

Arduino Timer / PWM cheat sheet

Arduino Timer

Arduino UNO (ATmega328p) has three 8bit timers

Timer0 - used for millis() micros() delay()… and is on pin 5, 6
Timer1 - 16bit timer is on pin 9, 10
Timer2 - 8bit timer is on pin 3, 11

[Read More…]

 

Lineage 2 - Auto Clicker

ac2usb.jpg

Ac2usb is a small usb piece, like a usb pen-drive. It actually is physical keyboard mouse combo which used for automated key press and mouse click for online game, Lineage II in specific. It works on all Lineage II servers with or without lameguard, smartguard or whatever-guard there might be. Yes, it works just like the very real-life keyboard mouse you are using, but without any buttons :D

[Read More…]

 

AVR - Transistor tester

avr-ttester-st7735.jpg

I always want one since it first appeared on the interweb around 2005. The very first version used PIC chip and it originated namely LC meter. I actually bought all components but at that time, I had no clue how to program PIC, and thus I failed to build one. I still have no idea how to program PIC chip until now :D

[Read More…]

 

PS3 pwned

PS3-PHAT.jpg Got a PS3 console from my cousin. It’s PHAT version, yeah, the big-fat version, back in 2008 or something. The first thing I do with this console is tear it down LOL. I don’t have any PS3 game and I don’t play game on console, so maybe I’ll put Linux on this thing. Then I have to jail-brake this PS3 first. This entry is about hacking an old PS3 console.

[Read More…]

 

Wordclock = WS2811B + Arduino = beautiful combination

wordclock_intro.jpg I wanted to make one a few years ago but I didn’t have much time as well as I didn’t know how to do it, or was too lazy to do it :D
Back then, I lacked of enthusiasm, motive and didn’t want to learn new things. Until this year, I had more free time and change of mind, I want to learn new things. So, I started this project, a few years after

[Read More…]

 

Serial Communication for debugging - dummies version

Com_port.jpg

If you are older than 28 years old, you might already know what a COM port looks like. Yes, COM port stands for Communication port. It was used widely to connect external device to the computer in the old days around 2005, such as: modem, mouse, even printer or transfer data between 2 PCs. Yes, COM port was understood as serial port.

[Read More…]

 

ATTiny13 Programming with Arduino IDE

attiny13a-dip.jpg Sometime, you need a small circuit to flash some LEDs or do some simple task, say, power on delay function for your DIY amplifier, power on reminder for your soldering station (beep every 3 mins) - which I forgot to turn off all the time… probably, an Attiny13 is just what you need.

[Read More…]