Tetrix PRIZM Tutorial 2 – Hello World

Alright, it is time to do some fun programming with PRIZM. The obligatory first challenge has to be HELLO WORLD. This is just standard programming protocol when starting any new learning with a device.

For this activity you will need

  1. PRIZM
  2. USB cable to connect to computer
  3. Arduino software
  4. Battery supply
  5. On/Off switch

If you have not already downloaded the PRIZM library, then please do so as we will be using the example code provided for this challenge.

Step 1: Your first step is to open up the first sketch in the library called Blink_RedLED

You should see the following code

/* PRIZM Controller example program
* Blink the PRIZM red LED at a 1 second flash rate
* author PWU on 08/05/2016
*/

#include <PRIZM.h> // include the PRIZM library

PRIZM prizm; // instantiate a PRIZM object “prizm” so we can use its functions

void setup() {

prizm.PrizmBegin(); // initialize the PRIZM controller

}

void loop() { // repeat this code in a loop

prizm.setGreenLED(HIGH); // turn the RED LED on
delay(1000); // wait here for 1000ms (1 second)
prizm.setGreenLED(LOW); // turn the RED LED off
delay(1000); // wait here for 1000ms (1 second)

}

 

Step 2: Go ahead on turn on the power to the PRIZM. We need to make sure the device is recognized by the computer and ready to rock and roll.

Step 3: Verify the code.It should be good since it is in the library, but it is a good habit to practice when you start writing your own code.

Step 4: Upload the sketch to PRIZM. Once the orange light stops blinking on the PRIZM you are good.

Step 5: Push the green start button

BOOM! You should see your red light flash off and on.

 

What next?

  1. Can you turn on the green light?
  2. Can you mix and match the red and green?
  3. Can you change the tempo of the lights?
  4. Can you create a pattern on morse code?

Please upload and share your ideas by leaving a comment here or on my YouTube channel

 

As always let me know what you think and what questions you have. Until the next tutorial, keep programming.

 

 

 

 

 

 

2 throughts on "Tetrix PRIZM Tutorial 2 – Hello World"

  1. very nice. Thanks.

    In a future post can you include some trouble shooting solutions? Such as: what happens if I am not getting to the right com port; what happens when I do have a coding error and what are the most common ways to quickly know what to do to fix it? I know these are common to all arduno coding and they are well answered in the community, but this device looks SO great that there will likely be people coming directly to this with little or no Arduino background.

    With the same thought in mind, how about a post showing the most common Arduino resources that you referred to in your first tutorial. And showing how to access the wonderful Grove sensor example program library?

Leave a Reply to w7eryronCancel reply