SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion area - What have you built with your Micro View

Moderators: Help@GeekAmmo, marcus@geekammo

User avatar
By Red Sand
#180246
And here's my first little sketch: take a squiggly line made up of 500 randomly placed dots - wait two seconds, clear the screen and do it again . . .

I am not very good at writing code so apologies up front for doing stuff wrong and without any sense of organization or thought of efficiency . . .
Code: Select all
#include <MicroView.h>

int xLoc = 32;
int yLoc = 24;
int counter = 0;

void setup() {
    uView.begin();              // start MicroView
    uView.clear(PAGE);          // clear page
    uView.display();
    uView.clear(PAGE);          // clear page
}

void loop() 
    {
      uView.pixel(xLoc,yLoc);
      uView.display();        // display current page buffer
      delay(12);
      xLoc = xLoc + random(-1,2);
      yLoc = yLoc + random(-1,2);
      counter ++;
      if (counter > 500) {
        delay(2000);
        uView.clear(PAGE);
        counter = 0;
      }
      if (xLoc < 1) {
        xLoc = 1;
      }
      if (xLoc > 62) {
        xLoc = 62;
      }
      if (yLoc < 1) {
        yLoc = 1;
      }
      if (yLoc > 46) {
        yLoc = 46;
      }
    }
User avatar
By Red Sand
#180259
. . . I call this one "jittery boxes" . . .
Code: Select all
 

#include <MicroView.h>

int px = 32;
int py = 32;
int pxr = 0;
int pyr = 0;
int px2 = 32;
int py2 = 32;
int pxr2 = 0;
int pyr2 = 0;
int rs = 5;


void setup() {
    uView.begin();
    uView.clear(PAGE);      // clear the page buffer

}

void loop() {
    uView.rectFill(px,py,rs,rs);
    uView.rectFill(px2,py2,rs,rs);
    uView.display();        // display current page buffer
    delay(20);
    uView.clear(PAGE);

    pxr = random(-1,2);
    px += pxr;
    px = constrain(px, 0, 63-rs);
    pyr = random(-1,2);
    py += pyr;
    py = constrain(py, 0, 47-rs);

    pxr2 = random(-1,2);
    px2 += pxr2;
    px2 = constrain(px2, 0, 63-rs);
    pyr2 = random(-1,2);
    py2 += pyr2;
    py2 = constrain(py2, 0, 47-rs);




}
User avatar
By Red Sand
#180266
. . . getting the Lesson Plan ready . . . woo hoo . . .
You do not have the required permissions to view the files attached to this post.
User avatar
By Red Sand
#180274
How do I attach videos . . . maybe this will work . . . this project is obviously inspired while listening to a Def Leopard song . . .

https://podcasting.usg.edu/4DCGI/Podcas ... 993371.mp4

The purpose of this simple project is to provide a completed circuit so I can now design an interface to house the following (what I'm doing is an example for them to see how they can do something similar):
  • 9V battery
  • on/off switch
  • 10K Trimpot
  • Big 12mm Button
  • SparkFun MicroView - OLED Arduino Module
  • SparkFun MicroView - USB Programmer
  • misc wiring to connect everything
Students will taking a very action-centric approach, omitting activities and depth typically involved with a rational approach.

After selecting a project or designing their own, building it, testing it, and debugging it, they will document their system with photo(s) explaining the purpose of the system, identifying and describing the purpose of individual components, & then explain how the program pulls everything together . . . and so forth.

THEN . . . the design of the system housing really begins . . .

They will define a (simple) Goal Statement, very brief but guiding Design Specification, several hand-generated concept sketches, then they will evaluate the project and create a 3D CAD model based on the best information they've come up with at that point, then they will make 3D printed part(s), install the components of their system (mine is just used as an example), test it, write a brief summary of the +'s and -'s and blah, blah, blah.
User avatar
By Red Sand
#180283
I used the data sheets - when available - and then drug out the calipers to create the parts so I could generate some super-quick concept models . . .
You do not have the required permissions to view the files attached to this post.
User avatar
By Red Sand
#180284
. . . first concept . . . the box . . .

I forgot, I'm going to have to add a switch for the 9V power supply . . .
You do not have the required permissions to view the files attached to this post.
User avatar
By Red Sand
#180297
Help@GeekAmmo wrote:Great work. You can also get the original 3D model from here

[ . . . snip . . .]

JP
Thank you JP

Eventually, I'll be converting these SketchUp models for use in SolidWorks then taking the CAD model and creating a 3D printed model, assembling the components and blah, blah, blah . . .