Ardu-Stim Generator

Current Pattern

Default 36-1 Crank

72 segments

Crank
Cam1
Cam2

Manual Pattern Editor

Ready

Pattern Configuration

Pattern Library & Tools

Pattern Tools

Interactive Segment Editor (Click segments to select, then use controls below)

0 segments selected Tip: Arrow keys to navigate, Shift+Arrow for range select, Space to toggle, Keys 1-3 toggle signals

Select one or more segments above to edit their signals

Crank Signal
35 / 72 segments
Cam1 Signal
0 / 72 segments
Cam2 Signal
0 / 72 segments

Wheel

🖱️ Scroll to zoom • Drag to pan • Click segments to select • Keys 1-3 toggle signals • Click buttons for zoom controls

💡 Selected segments: 0 | Focused: None

Scope

Time:
Amp:

🖱️ Scroll to zoom • Shift+Scroll = time only • Ctrl+Scroll = amplitude only • Drag to pan

Signal Order & Visibility

Crank Bit 0 • #3b82f6
Cam1 Bit 1 • #10b981
Cam2 Bit 2 • #ef4444
💡 Drag signals to reorder them • Grid: basic lines • Segments: pattern divisions • Time Markers: segment numbers
Arduino Code Output

Arduino Code Output

Pattern Name
Default 36-1 Crank
Total Segments
72
Array Size
72 bytes
Memory Usage
72 bytes (PROGMEM)
Generated Arduino Code

Code Format Information

Signal Encoding:
• Crank signal: Bit 1 (value & 1)
• Cam1 signal: Bit 2 (value & 2)
• Cam2 signal: Bit 4 (value & 4)
Memory Storage:
• PROGMEM: Stored in flash memory
• Access: pgm_read_byte(&array[index])
• Size: 72 bytes total

Usage Example

// Read pattern value at index
uint8_t segmentValue = pgm_read_byte(&pattern[currentSegment]);

// Extract individual signals
bool crankHigh = segmentValue & 1;
bool cam1High = (segmentValue & 2) >> 1;
bool cam2High = (segmentValue & 4) >> 2;

// Set output pins
digitalWrite(CRANK_PIN, crankHigh);
digitalWrite(CAM1_PIN, cam1High);
digitalWrite(CAM2_PIN, cam2High);