xyzio

Installing Debian on the Beaglebone Black Rev B

leave a comment »

I wanted to flash my BeagleBone Black Rev B to Debian so I could try installing a wi-fi dongle.  The Rev C is the latest version of the BeagleBone Black and I couldn’t find out if the Debian on the BeagleBone website supported the Rev B.  I decided to just try it out.

So for those that are wondering, yes Debian version 2014-05-14 works on the BeagleBone Black Rev C.  The instructions on their getting started page work.

And once you have Debian, the WiFi dongle setup instructions here on Adafruit (pdf) will work to set up your dongle.

Installing Debian on BeagleBone Black Rev B

Written by bleuchez

January 5, 2015 at 1:16 am

Non-Arduino Adafruit OLED Display Library

leave a comment »

Adafruit sells a really nice 16×2 OLED display and they even have an Arduino library for it.  However I only have a Atmega32 and Arduino does not run on the Atmega32.  Rather than spending $20 or so for an Arduino, I decided to port their library to AVR.  It wasn’t too difficult since Arduino is just AVR C++ behind the scenes.

Re-writing the Adafruit library was straightforward.  I hardcoded PORTA as the I/O port but some additional code could make that generic.  I had to re-write the digitalRead and digitalWrite functions to read and write out of PORTA instead of the Arduino pins.  The delayMicroseconds command is replaced by the AVR _delay_ms() macro.

The trickiest part was figuring out how to implement the print function.  After some digging around I found it in the Arduino code at \hardware\arduino\cores\arduino\Print.cpp.  The print function calls a write function that iterates through the character string which then calls our native OLED write on each character.  This seems seems a little roundabout but I guess that is how they chose to implement it.

Adafruit 16x2 OLDED display

Links:

My No-Arduino code:
https://bitbucket.org/xyzio/avr-code/src/master/characterOLED/

Adafruit Arduino library:
https://github.com/ladyada/Adafruit_CharacterOLED

Youtube demo:

Written by bleuchez

December 26, 2014 at 3:02 pm

How to get an API Token from Digital Ocean

with one comment

An authorization token is required when connecting to Digital Ocean through a third-party app.  The token is used in the header tag of the connection to verify that you’ve authorized the connection.

To get the API token, log into the control panel through the log-in page:  https://cloud.digitalocean.com/login

Then click on the Apps & API (1) link and go to the Generate new token (2) button.

 

After clicking on the Apps & API link, you’ll get to New Personal Access Token page.  First enter a token name (3) – I have TestToken in the example below.  Then select the access level (4), read is recommended unless you want the app you are authorizing to edit droplets and settings in your account.  Finally, click on Generate Token (5) to generate your token.

Clicking Generate Token will take you back to the Personal Access tokens page.  At this point you’ll be presentated with the token.  Copy this token to a safe place.  You will only see it once.  Use the delete button to delete the token.

 

 

 

Written by bleuchez

September 21, 2014 at 8:26 pm

Browsing through Amazon’s Top 10 Best Sellers

leave a comment »

This project lets you browse through Amazon’s various product categories and view the top 10 sellers for that category.  You can browse down into sub-categories as well as up into parent categories.

I wrote this to learn about Amazon’s Product Advertising API.  Using the API is simple, especially with the sample code provided by Amazon.  Amazon returns a lot of information, so the slightly tricky part was figuring out how to parse the XML to get only the information I need.

 

Amazon Top Ten Browser

 

Written by bleuchez

September 10, 2014 at 4:37 pm

RSS Feed Creator with hosting

leave a comment »

Need a way to get your audiobooks, open courseware, videos, or other content onto your podcast player? The RSS Feed Maker will take your URLs and convert them into a RSS document and give you a URL to give to your podcast player.

The RSS feed is created with Argotic and the files are hosted on Amazon’s S3 file hosting service.

 

 

 

 

 

 

 

 

 

 

 

Written by bleuchez

September 8, 2014 at 11:59 pm

PyCharm vs Komodo IDE for Python Scripting

leave a comment »

Activestate seems to have lost its way with Komodo – their scripting language IDE.  It used to be a fast, light, and highly usable IDE that made debugging easy.   They went off the rails with version 8- it was mostly a UI re-skin with very unstable code, it crashed frequently, froze when opening certain files, and had extremely slow network access.  I called it the ‘so what?’ release.  They fixed most of these issues in rev 8.5 but the high memory usage still remains.  What soured me was paying for a full version upgrade for what was mostly a buggy UI update.

Lately, I’ve been getting into Python and I’ve discovered JetBrains’ free Python IDE – PyCharm.  JetBrains has a moderately priced paid version but what is amazing is that the free version of PyCharm includes a Python debugger.  Compare this to Activestate’s free Komodo Edit which does not include a debugger of any sort.

Plus, the paid version of PyCharm includes subscriptions and upgrades for 1 year.  Activestate requires you to pay $87 in addition to the price you pay for Komodo for a 1 year subscription.

Besides all the price gouging, I’ve found that the free version of PyCharm is a much better Python editor than Komodo.

Here are some great features in PyCharm that are not in Activestate’s Komodo:

Multiple debug sessions.  Want to debug two scripts at the same time?  You can do that with PyCharm.

Typing in the file window highlights all files that match any of the characters.  Komodo only goes to the first match and that is only if you type really fast.  Otherwise it will skip around.

Dropdowns for everything.  PyCharm dropdowns are almost as good as Visual Studio.  In PyCharm I can define a variable as a list/string/dictionary and every time after that I’ll get all associated methods when I type in the period after the variable.  Importing a module?  You’ll get dropdowns for all the module members.

Built-in Python package manager, built-in TODO manager, built-in windows cmd console manager (it even lets you have multiple sessions open), and even a built-in repository browser!

A little lightbulb (similar to ReSharper) pops up when there is an error or the code can be improved in some way.  Clicking on it shows a list of things it can do to fix or improve the code.  It makes the changes for you!

 If you are a Komodo Python user, then try PyCharm.  You will be pleasantly surprised.

Written by bleuchez

August 30, 2014 at 12:40 am

Posted in IDE, review

Tagged with , , , ,

libapache2 mod_mono install freezing during install on Ubuntu at Digital Ocean

leave a comment »

I had a problem with my libapache2-mod-mono install freezing during install when trying to run ASP.NET applications on Ubuntu.

The workaround for this is to open another session and restart/reload apache:

root@xyzio:/home/xyzio# service apache2 reload
root@xyzio:/home/xyzio# service apache2 restart

This is what I would see and the session would freeze at the [OK]:

apt-get install libapache2-mod-mono

Setting up libapache2-mod-mono (2.11+git20130708.6b73e85-2) ...
Using mono-apache-server4...
apache2_invoke: Enable module mod_mono
* Restarting web server apache2 [ OK ]
apache2_invoke: Enable module mod_mono_auto
* Restarting web server apache2 [Sun Dec 08 23:03:01.698809 2013]
[so:warn] [pid 4455] AH01574: module mono_module is already loaded, skipping
[ OK ]

Source:
http://askubuntu.com/questions/135547/how-do-i-set-up-mod-mono-on-11-10

Written by bleuchez

February 5, 2014 at 10:00 pm

Follow

Get every new post delivered to your Inbox.