Arnov Sharma
Published © MIT

STEAM MACHINE Iota

Lattepanda IOTA-based Steam Machine running Bazzite.

BeginnerFull instructions provided20 hours126
STEAM MACHINE Iota

Things used in this project

Hardware components

DFRobot lattepanda iota
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1

Software apps and online services

Fusion
Autodesk Fusion
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Steam Logo Ring 1

Steam Logo Ring 2

Steam Logo Main

SW Actuator

UPS Holder

Main Body

Exhaust Air Duct

Front Cover

Main Body IOTA GRILL

LED DIFFUSER

LID

Power Adaptor

Schematics

SCH

Code

SCH

C/C++
#include <Adafruit_NeoPixel.h>
#define LED_PIN 1
#define BTN_PIN 0
#define NUM_LEDS 11
#define BRIGHTNESS 80
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
int mode = 0;
const int TOTAL_MODES = 7;
int lastBtnState = HIGH;
unsigned long lastDebounce = 0;
const unsigned long DEBOUNCE_MS = 50;
uint32_t TEAL = strip.Color(0, 200, 180);
uint32_t RED_COLOR = strip.Color(180, 0, 0);
unsigned long lastUpdate = 0;
int animStep = 0;
float breathVal = 0.0;
float breathDir = 1.0;
void setup() {
strip.begin();
strip.setBrightness(BRIGHTNESS);
strip.show();
pinMode(BTN_PIN, INPUT_PULLUP);
}
void loop() {
handleButton();
runAnimation();
}
void handleButton() {
int reading = digitalRead(BTN_PIN);
if (reading != lastBtnState) lastDebounce = millis();
if ((millis() - lastDebounce) > DEBOUNCE_MS) {
if (reading == LOW) {
mode = (mode + 1) % TOTAL_MODES;
animStep = 0;
breathVal = 0.0;
breathDir = 1.0;
strip.clear();
strip.show();
delay(200);
}
}
lastBtnState = reading;
}
void runAnimation() {
switch (mode) {
case 0: modeSteadyTeal(); break;
case 1: modeChase(); break;
case 2: modeBreathingTeal(); break;
case 3: modeComet(); break;
case 4: modeRainbowFlow(); break;
case 5: modeSolidRed(); break;
case 6: modeRedPulse(); break;
}
}
void modeSteadyTeal() {
if (millis() - lastUpdate < 500) return;
lastUpdate = millis();
for (int i = 0; i < NUM_LEDS; i++) strip.setPixelColor(i, TEAL);
strip.show();
}
void modeChase() {
if (millis() - lastUpdate < 60) return;
lastUpdate = millis();
strip.clear();
strip.setPixelColor(animStep % NUM_LEDS, TEAL);
strip.show();
animStep++;
}
void modeBreathingTeal() {
if (millis() - lastUpdate < 20) return;
lastUpdate = millis();
breathVal += breathDir * 2.0;
if (breathVal >= 255) { breathVal = 255; breathDir = -1; }
if (breathVal <= 0) { breathVal = 0; breathDir = 1; }
float f = breathVal / 255.0;
uint32_t c = strip.Color(0, (int)(200 * f), (int)(180 * f));
for (int i = 0; i < NUM_LEDS; i++) strip.setPixelColor(i, c);
strip.show();
}
void modeComet() {
if (millis() - lastUpdate < 50) return;
lastUpdate = millis();
for (int i = 0; i < NUM_LEDS; i++) {
uint32_t c = strip.getPixelColor(i);
uint8_t r = ((c >> 16) & 0xFF) * 0.5;
uint8_t g = ((c >> 8) & 0xFF) * 0.5;
uint8_t b = ( c & 0xFF) * 0.5;
strip.setPixelColor(i, strip.Color(r, g, b));
}
strip.setPixelColor(animStep % NUM_LEDS, TEAL);
strip.show();
animStep++;
}
void modeRainbowFlow() {
if (millis() - lastUpdate < 30) return;
lastUpdate = millis();
for (int i = 0; i < NUM_LEDS; i++) {
int hue = ((animStep * 3 + i * (65536 / NUM_LEDS)) & 0xFFFF);
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(hue, 255, 200)));
}
strip.show();
animStep++;
}
void modeSolidRed() {
if (millis() - lastUpdate < 500) return;
lastUpdate = millis();
for (int i = 0; i < NUM_LEDS; i++) strip.setPixelColor(i, RED_COLOR);
strip.show();
}
void modeRedPulse() {
if (millis() - lastUpdate < 20) return;
lastUpdate = millis();
breathVal += breathDir * 2.0;
if (breathVal >= 255) { breathVal = 255; breathDir = -1; }
if (breathVal <= 0) { breathVal = 0; breathDir = 1; }
float f = breathVal / 255.0;
uint32_t c = strip.Color((int)(180 * f), 0, 0);
for (int i = 0; i < NUM_LEDS; i++) strip.setPixelColor(i, c);
strip.show();
}

Credits

Arnov Sharma
376 projects • 393 followers
I'm Arnov. I build, design, and experiment with tech—3D printing, PCB design, and retro consoles are my jam.

Comments