terriko: (Default)
[personal profile] terriko
This is crossposted from Curiousity.ca, my personal maker blog. If you want to link to this post, please use the original link since the formatting there is usually better.

With my travel and work schedules, I haven’t had time to hack my original MicroView, but the replacement ones arrived while I was out at ABQ Mini Maker Faire! So of course, I had to try *something* now that I can actually flash things to it.


Here’s my current very simple program: a smile with a wink!


microview_wink


Although it’s probably better with video



And of course, it’s more fun if you can also check out the code so I dumped it into my git repository. Here it is in case you’re not feeling like clicking through:



/* 
 * microview_wink: a simple winking face animation for the MicroView
 * 
 * Created by: Terri Oda 
[Error: Irreparable invalid markup ('<terri [...] (at)>') in entry. Owner must fix manually. Raw contents below.]

<em>This is crossposted from <a href="http://curiousity.ca">Curiousity.ca</a>, my personal maker blog. If you want to link to this post, please use <a href="http://goo.gl/H459dm">the original link</a> since the formatting there is usually better.</em>

<p>With my travel and work schedules, I haven&#8217;t had time to <a href="http://curiousity.ca/2014/microview-the-bad-the-good-and-the-awesome/">hack my original MicroView</a>, but the replacement ones arrived while I was out at ABQ Mini Maker Faire! So of course, I had to try *something* now that I can actually flash things to it.</p>
<p>Here&#8217;s my current very simple program: a smile with a wink!</p>
<p><a href="http://curiousity.ca/2014/winking-microview/microview_wink/#main" rel="attachment wp-att-358"><img src="http://curiousity.ca/wp-content/uploads/2014/09/microview_wink-300x225.jpeg" alt="microview_wink" width="300" height="225" class="alignnone size-medium wp-image-358" /></a></p>
<p>Although it&#8217;s probably better with <a href="http://youtu.be/qSU3orqJgIE">video</a>&#8230;</p>
<p><site-embed id="39"/></p>
<p>And of course, it&#8217;s more fun if you can also <a href="https://github.com/terriko/microview/blob/master/microview_wink/microview_wink.ino">check out the code</a> so I dumped it into my git repository. Here it is in case you&#8217;re not feeling like clicking through:</p>
<p><script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=desert"></script></p>
<pre class="prettyprint">
/*
* microview_wink: a simple winking face animation for the MicroView
*
* Created by: Terri Oda <terri (at)="(at)" toybox.ca="toybox.ca">
* Sept 16, 2014
*/

#include <microview.h>

void setup()
uView.begin(); // start MicroView
uView.clear(PAGE); // clear page
uView.print("Hi Terri!"); // say hi
uView.display();
delay(1000);


void loop ()
//drawFace();
winkFaceAnimation();


void drawFace()
uView.clear(PAGE);

drawEyes();
drawNose();
drawMouth();

uView.display(); // display current page buffer


void drawEyes()
uView.circle(20, 15, 5);
uView.circle(45, 15, 5);


void drawNose()
uView.line(30, 22, 35, 32);
uView.line(35, 32, 31, 32);


void drawMouth()
uView.line(20, 40, 25, 45);
uView.line(25, 45, 40, 45);
uView.line(40, 45, 45, 40);


void winkFaceAnimation()
for (int i = 0; i < 7; i++)
uView.clear(PAGE);

// animate one eye for the wink
switch (i)
case 0:
case 6:
uView.circle(45, 15, 5);
break;
case 1:
case 5:
uView.rect(40, 12, 10, 5);
break;
case 2:
case 4:
uView.rect(40, 14, 10, 2);
break;
case 3:
uView.line(40, 15, 50, 15);
break;


// draw the static parts of the face
uView.circle(20, 15, 5);
drawNose();
drawMouth();

// display and wait for the next frame to start
uView.display();
delay(500);

</pre>
<p>The MicroView was pretty easy to get up and running since this machine was already set up for arduino programming, I just had to remember to switch from the Adafruit Flora (what I'd been coding for last) to the Microview ( / the Arduino Uno). I'm pretty pleased with my first run, even though I am reminded that animation frame drawing is not my favourite activity. </p>
<p>I'm still planning on continuing with the necklace plan for the first of these, so I'm going to work on a few more animations while I decide how I'm going to handle power, shaping, and whether I'm going to want any other sensors in the final pendant.</p>

Profile

terriko: (Default)
terriko

January 2026

S M T W T F S
     123
45678910
111213 14151617
181920 21222324
252627 28293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 3rd, 2026 12:04 am
Powered by Dreamwidth Studios