Category Archives: Uncategorized

Arduino & Python Soundlight Spectrum

Continuing with my initial Soundlight project, I have modified the code to produce six distinct lights depending on the frequency of the music! Why six? Well, that’s the limit of the Arduino’s PWM (analog out) pins, so that’s as much as you can get with a single Arduino Uno. It works by using Fast Fourier Transforms to analyze the sound frequencies and find how much sound is coming out from each frequency range (special shout out to Luis for helping me understand this beautiful math!)

Here’s a quick demo video:

Here is the Arduino code for receiving the serial data and changing the lights:

Here is the Python code that does all the heavy processing and Fast Fourier Transforms:

And finally, here’s how to wire it all up:
Arduino Soundlight Diagram

 

Arduino & Python Soundlight

I’ve built a shiny little Python program that will monitor your computer’s sound via the sound card’s stereo mix feature and send the volume level to an Arduino to change an LED’s brightness.

The code is available on Github and is embedded below. Many thanks to Luis for helping me find the right math to make this look best :D

APPLE, Y U NO SHUT UP AND TAKE MY MONEY

Warning: Rant ahead.

TL;DR: Tried to buy an in-app purchase for an iPad app. Despite having two iTunes accounts, two banks, and two PayPal accounts and trying numerous combinations of these, I have yet to be successful.

Y U NO SHUT UP AND TAKE MY MONEY

OK, a bit of background: I’m Colombian, I’ve worked in the US, and right now I’m living in Mexico. I have three bank accounts, one for each country, each with its own debit card. I mainly use my US account for online purchases.

Late today, I got the sudden urge to buy an in-app purchase from an iPad app (it’s a Go book). Ever since I’ve had an iTunes account, I’ve always used prepaid cards to buy stuff, but my iTunes balance was MXN$26 and the book costs MXN$60 (US$5). So I though, “Hey, I’ll just add my card to my account so I can buy this awesome book” .

I added my US debit card, but my Mexican iTunes account instantly rejected it, saying that it’s not a valid Mexican card depite it having a billing address in Mexico. Bummer, I though. But then I remembered I had a Mexican debit card too. I added that one, and it worked fine until I tried to purchase the book, when my iPad yelled that the payment was rejected.

I wasn’t giving up that easily. I also have a US iTunes account, which I use to download the occasional free app that is only released in the US (Bing, I’m looking at you!!). So I decided to try my luck: I logged into that account, tried to add my card, and then was rejected because of an (obviously) invalid address.

Then I remembered that Apple accepts PayPal for US iTunes accounts. For some reason, the option to add a PayPal account wasn’t on the iPad, so I opened up iTunes on my PC and tried to add it there. I also have two PayPal accounts, one in the US and another in Mexico. I logged in to my Mexican PayPal, which is my main account, and approved the iTunes authorization. iTunes instantly rejected it because the PayPal account wasn’t from the US.

I tried again with my US PayPal account, but it was rejected because of lack of a funding source. So I go to my account settings to add my card to the PayPal account, and PayPal won’t accept it because the card is already associated with another PayPal account, my Mexican account. So I logged out of my US PayPal, logged into my Mexican PayPal, deleted my card, logged back into my US PayPal and add it. Finally, iTunes was happy and my PayPal account was added to my Apple ID.

After all that mess, I tried to purchase the book again, only to find out the reason PayPal isn’t available as an option in the iPad: you can’t buy apps or in-app purchases with PayPal.

At this point, I was infuriated. Any normal person would have given up. But I tried once more.

After searching for a while, I found out that Walmart sells iTunes gift card for instant e-mail delivery. So I though, “what the heck, one last try won’t hurt”. I try buy the card, only to be greeted with yet another US-only billing option. Thankfully, Walmart accepts PayPal, and thanks to that last step, my US PayPal was all set up for purchases.

I purchased the gift card and waited patiently for the one hour Walmart says it takes to complete the order. After one hour, the order was still processing. After two hours, nothing had changed. I cancelled the order and Walmart instantly refunded me.

Now I gave up.

This is infuriating. I have the money to buy something but Apple won’t take it. The main problems here are:

  1. Apple won’t accept international debit cards, even if they have local billing addresses.
  2. Apple won’t accept local debit cards if they have international billing addresses.
  3. Apple rejects payment from a local debit card that I’ve previously used to buy online elsewhere.
  4. Apple won’t allow PayPal payments for iPad apps and in-app purchases.

These are the same payment methods I’ve used on Steam, Amazon, eBay, and the Windows Phone Marketplace, among others. I find it amazing that Apple has such a hard time taking my money.

Tomorrow I’ll probably go buy a physical iTunes gift card at a corner store, because Apple has given me no other choice but to spend MXN$200 when I only need MXN$34. But then again, maybe by tomorrow the urge to buy that book will be long gone.

New Windows Phone App: Trainer Toolkit

Trainer Toolkit IconTrainer Toolkit is an app to help to help you with the awesome Pokémon series of games. Trainer Toolkit includes a number of features crucial to every Pokémon trainer, including:

  • Type chart for quickly looking up type effectiveness
  • Nature chart to check the stat boosts of all natures
  • Information on STAB, stats, and status ailments
  • Built-in Bulbapedia browser for looking up anything in the über-complete Pokémon encyclopedia

Additionally, Trainer Toolkit saves your state so that you always come back to where you were in the app and allows opening Bulbapedia links in IE.

Trainer Toolkit is $0.99 USD in the Marketplace, with a full-featured and ad-supported trial. Buy the app to remove the ads and support its development!

Bugs or suggestions? Email pokemon@julianapena.com

Download

Download Trainer Toolkit

Screenshots

screen3 screen1 screen2

2011 Resolutions

2011

Foto by Mooi

In no particular order:

  1. Contribute a bug fix to an open-source project
  2. Travel more within Mexico
  3. Eat healthier food and exercise more
  4. Publish at least two projects (apps, extensions, etc.)
  5. Take more photos
  6. Blog more on HogarGeek, at least one post per week
  7. Become a senior MSP
  8. Be more outgoing, make new friends and get to know existing friends better
  9. Get at least 93 GPA in the next two semesters
  10. Become a badass coder and tester during the summer

2010 in Review

2010 has been an amazing year, my best one yet. There was a little bit of everything in 2010.

Highlights of the Year

  • January: Interviewed for Microsoft in Redmond
  • January: Returned to Mexico to start my 4th semester
  • February: Joined Hogar Geek as a contributing blogger and editor
  • March: Joined the Google Technology Users Group in Mexico City as a Chrome Extensions Developer
  • April: Attended the Google DevFest and presenting my Chrome Extensions
  • April: Joined my school’s CompSci Student Associacion, AESC, as a full member and participated in events like Dia ISC.
  • June: Moved to Redmond and started my internship at Microsoft
  • July: Travelled to awesome places in the Pacific Northwest, like the San Juan Islands, Portland and Leavenworth
  • July: Became a master at C programming and driver development
  • August: Finalized my internship and returned to Mexico to start my 5th semester
  • October: Became a Microsoft Student Partner
  • November: Published WinMilk, my first WP7 app

Resolutions

At the end of 2009, I made 10 New Year’s resolutions. How well did I fullfill them?

1. Get a job during the summer.

My first goal, and what will always define 2010 for me: the year I first had a real job, and the best job I could have imagined, at Microsoft.

2. Read at least one book per month.

Not really fullfilled. I’ve never read so few books in a year. I have, however, expanded my technical knowledge in subjects still very new to books, like WP7 apps.

3. Play only one story-driven game at a time, no switching until I beat the game.

If another change in me greatly defined this year, it was the end of my gaming obsession. I still love gaming, and I did mostly complete this goal (Fallout 3, then BioShock 2, then Assasin’s Creed II), I no longer feel the urge to game as I did before.

4. Write more blog posts, at least two per month.

Maybe not 2 every month, but I did write about 30 blog posts this year, which is an average of over 2 per month.

5. Keep programming, improve my current projects and create new ones. At least one new project every two months.

Instead of just pushing out new projects, this year was more about improving existing projects like ChromeMilk and Postponer, and pushing out the biggest project I’ve ever worked on, WinMilk. I started developing WinMilk when the WP7 tools first came out in March, and after returning from my internship in the summer, I have been developing it constantly. I finished it right on time for the US release of WP7 and it was the first Mexican app in the WP7 Marketplace. I’ve also been working on a few unpublished projects.

6. Eat healthier food and do some exercise at least twice a week.

I thinks I’ll skip this one. Needless to say, it was not fullfilled.

7. Be more open minded and try out things I wouldn’t otherwise.

Check. Awesome year filled with new experiences.

8. Be more outgoing and more open to friends and family.

My most outgoing time of my life was in Redmond, and I loved it. I’ve also made awesome new friends this year, and got to know existing ones better.

9. Watch TV shows and play games only on weekends, and study and do homework only on weekdays.

Mostly fulfilled, though there was always the exception for cliffhangers and heavy projects.

10. Be more kind and helpful to my friends, peers and family.

I’ve tried a lot this year to become more aproachable and kind to everyone, and I’ve really liked it.

Firsts

2010 was a year filled with awesome firsts. 2010 was the year that marked the first time I ever….

  • ate sushi
  • used chopsticks
  • debugged remotely
  • used remote desktop
  • bought music online
  • rode a ferry
  • programmed a driver
  • had a job at a real company

New Year’s Resolution for 2010

credited_4189061616_922d3f3734

In no particular order:

  1. Get a job during the summer.
  2. Read at least one book per month.
  3. Play only one story-driven game at a time, no switching until I beat the game.
  4. Write more blog posts, at least two per month.
  5. Keep programming, improve my current projects and create new ones. At least one new project every two months.
  6. Eat healthier food and do some exercise at least twice a week.
  7. Be more open minded and try out things I wouldn’t otherwise.
  8. Be more outgoing and more open to friends and family.
  9. Watch TV shows and play games only on weekends, and study and do homework only on weekdays.
  10. Be more kind and helpful to my friends, peers and family.