Friday, June 27, 2014

Leds and Buttons - Freescale FRDM-K64F

Hi makers, programmers and curious :)

   This post will be about my first contact with the ARM technology, by means of my newly arrived Freescale FRDM-K64F development board. As a good Arduino user the first thing I wanted to do with my board was to blink the RGB led it features onboard, so I did it!. The code I developed can be found here . I got a lot of help and examples from the mBed online compiler.

my first ARM-based project

   The blinking LED example from mBed website uses a "wait()" function which I don't like (because wastes processing time), so I developed my own code based on a counter that controls the "entering or not" in the blinking function. It is possible to notice in the gif image above that all the led colors are being lit, one after another; I was satisfied with the results, so I moved to the next step: adding buttons to it!. 
--------------------------------------------

   Again my code is very simple (and can be found here): when no buttons are pressed the blue LED is on; when the left button is pressed the LED turns green and for the right button the LED turns red. It took me only a few minutes to write, compile and test both circuits!.

buttons and LED's on my ARM board

I hope you guys are enjoying my blog, and I surely want to here from you. See you all soon.

No comments:

Post a Comment