Search

ArachnidLabs minishift arduino example

ArachnidLabs minishift arduino example

The ArachnidLabs minishift is a great little board that I purchased from the UK Maker Faire 2014 from their stand.

I could not find much online about the board, but here is a basic example to show the wiring and display some scrolling binary.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
http://creativecommons.org/licenses/by-nc-sa/4.0/

Filename: minishift.pde

/*
Sample code to display binary 0..255 on the @ArachnidLabs minishift
Written by Gregory Fenton, http://labby.co.uk
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

http://creativecommons.org/licenses/by-nc-sa/4.0/

Wiring:
5v (or 3.3v) connected to 5v  (pin 1) of minishift
gnd connected to gnd  (pin 2) of minishift
clockPin connected to SCK  (pin 3) of minishift
latchPin connected to CS   (pin 4) of minishift
dataPin  connected to MOSI (pin 5) of minishift
*/

int latchPin = 4;
int clockPin = 3;
int dataPin = 2;

void displayByte(int b)
{
    digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, LSBFIRST, b);
    digitalWrite(latchPin, HIGH);
}

void setup() {
  int i;
  //set pins to output because they are addressed in the main loop
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  
  //clear display by sending 256 blank bytes
  //256 is arbitrary and should be changed to the number of
  //columns in your display
  for(i = 0; i < 256; i++)
  {
    displayByte(0);
  }
}

void loop() {
  // Display the numbers 0 to 255 in binary
  int i;
  
  for (i = 0; i < 256; i++)
  {
    displayByte(i);
    delay(50);
  }
} 

Related posts

One thought on “ArachnidLabs minishift arduino example

  1. […] an addon from my last post, I have made a scrolling text display […]

Leave a Comment