Your source for daily hacks

Published on: October 24, 2013 / Comments: None

Oozby lets you design with OpenSCAD using Ruby

OpenSCAD is pretty popular amongst the 3D Printering community.  You can design your 3D modles using a meta language that describes what you are trying to build.  Frustrated with some of the methodoligies that OpenSCAD implements, Bluebie created Oozby.

While I can’t say that I’m much of a Ruby person, I’d much rather prefer using Python variants like SolidPython or pySCAD I can appreciate the goal to make technology more accessible to other people with different backgrounds.

Check out more on the Oozby site, and the source code on Github.

Published on: August 31, 2013 / Comments: None

This weekend learn X in Y minutes

The weekends are a good time to learn something new.  I stumbled on this site called Learn X in Y Minutes. It’s a crash course in a decent sized list of programming languages and tools.  There aren’t any chapters or anything, it’s like viewing the source code of a language to learn it.

I wouldn’t recommend the site if you don’t know any programming languages however, but if you know … C, you can check out ruby or haskell and I’m sure from just the code and comments you’ll pick a few things up.  While it’s mostly programming, there is shell scripting with bash, and git.  And once you learn git, you can add your own to the list!

Published on: August 28, 2013 / Comments: None

Tips that will make your Bash scripts pop

While looking through some Bash scripts, Fizer took some notes on some of the things other people are doing.  He’s compiled a list of items he thought were relevant.  A good resource for anyone looking to improve their scripts.

First up is adding colors to your scripts, I know it’s just visual but it really adds a lot to the quality of your scripts.  Also in his list are tips for debugging, checking if required binaries exist, and reading inputs with time-outs.

Read the full post here.

Published on: August 27, 2013 / Comments: None

Are you ready to move to an RTOS?

There’s an interesting article on The Bare Metal Enthusiast about to RTOS or not to RTOS.  Definitely an interesting topic.  First off if you don’t know, RTOS is Real Time Operating System.  It’s a sort of middle ground between writing some bare code on a microcontroller, to a full operating system like Linux or Windows.  It (usually) allows you to run multiple things at nearly the same time, and is a framework for modularizing your code and thought process.

It’s difficult finding a balance between using an RTOS and not using one.   For instance, you must know that running your blinky led program on an embedded Linux board (like the Pi) is way overkill and a lot of overhead.  But then if you’ve ever tried to handle a bunch of things at once like running a LCD, and reading inputs, and playing music from a bare metal application can be quite daunting to get your scheduling right.

The author also makes the comparison between 8-bit and 32-bit MCU’s.

It’s a good read, check out the full article here.

Published on: August 23, 2013 / Comments: None

… Or you can just learn vim

one-does-not-simply-learn-vimEarlier today while suggesting that you upgrade your Arduino IDE, I briefly mentioned my favorite programming editor vim.  Then I realized that there may actually be people in the world who do not know vim (not you, I’m sure you’re a seasoned Unix hacker and you’re reading this on your 40 column serial terminal using vim).  So I thought I should provide you with some info and resources.

First up is 10 reasons to learn vim.  This probably will not convince you to use vim, but it was worth a shot.

Learn vim progressively.  A sort of logarithmic ramp up to learning vim.  You can start to get a good idea of the power of vim by this tutorial.

The infamous vim cheat sheet for programmers.  That’s where the scary image above comes from.  I recommend getting a nice 11×17 landscape full color print of this and posting it on your wall.  Or getting your grandmother to crochet it into a blanket.

The interactive vim tutorial.  This one is cute, a sorta virtual vim you can learn on in your browser.  This will actually be pretty useful in the beginning.

Then there’s the mac-daddy of vim tutorials, vim adventures.  Who said you can’t make a video game using vim ?  It does help get the point across very well and help you memorize the keystrokes.

I recommend hitting up some of these tutorials and just starting to use it, it really is very powerful albeit a little weird at first if you aren’t used to it.

Or you can always buy a book.

Published on: August 23, 2013 / Comments: 1

It’s time to upgrade your Arduino IDE

I admit, I’m an old die-hard.  I prefer using vim and a makefile.  Whenever I do Arduino development the Arduino IDE kills me.  From the very beginning when it opens up this tiny little window, to the horrid multi-document interface, and finally to the end when I have an error, and the error message displayed below has absolutely no clue on what the problem really is.

You could take the obvious approach, and code with something like Notepad ++ or Sublime Text (or vim! VIMMMMMMMMM!!!) or you can hit the middle-ground.  Enter Arduino for Visual Studio / Atmel Studio.  Having used both Visual Studio and Atmel Studio (which the new Atmel Studio basically is Visual Studio….) I can say it’s not too bad.  It’s a plugin for VS/AS and it’s free (not free and open source, but free for your personal use).  I recommend grabbing Atmel Studio 6.1 that way if you want to do some bare metal coding on atmegas/avr’s you can go that route too.

(more…)

Published on: August 17, 2013 / Comments: None

Get Started with PSoC on the Cheap

PSoC, or Programmable System-on-Chip, combines a CPU along with configurable peripherals on a single die.  This combination gives you the flexibility to essentially design the perfect microcontroller for your project.  Need an ADC, 2 PWM’s, 2 Low Pass Filters, a Capacitive Touch Sensor, 2 DAC’s and a RS-232 port?  No problem.  Just drag and drop blocks to add peripherals to your PSoC, ‘wire’ them together, then reference them in your C code.  Until recently, it could be expensive to get started in serious PSoC development.  There are through-hole PSoC’s available, but they are rather limited devices and the idea of surface mount components is daunting to most beginners/DIYers.  Plus, debugging when you are responsible not just for the code but also the peripherals can be frustrating.  And a good debugger for PSoC was not available for free.

Well, Cypress Semi has you covered.  They now have an easy to use, inexpensive development board called the PSoC 4 Pioneer.  It combines an Arm Cortex-M0 CPU with Cypress’ impressive PSoC technology in an Arduino shield-friendly package for only $25.  They also offer plenty of PSoC training for free on their website.

NOTE: We do not receive any compensation for this, or any, article.  We are just genuinely interested in bringing you the latest in development gear.