Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringlengths
40
100
input
stringlengths
136
25.5k
output
stringlengths
207
10.3k
Generate a diagram.json code for Simon says game
#include "pitches.h" /* Constants - define pin numbers for LEDs, buttons and speaker, and also the game tones: */ const uint8_t ledPins[] = {9, 10, 11, 12}; const uint8_t buttonPins[] = {2, 3, 4, 5}; #define SPEAKER_PIN 8 // These are connected to 74HC595 shift register (used to show game score): const int LATCH_P...
{ "version": 1, "author": "Uri Shaked", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 183, "left": 18.6, "attrs": {} }, { "type": "wokwi-buzzer", "id": "buzzer", "top": 16, "left": 124, "attrs": { "volume": "0.1" } }, { "type": "wo...
Generate a diagram.json code for servos dancing
#include <Servo.h> #define NUM_SERVOS 32 Servo myServo[NUM_SERVOS]; void setup() { // Attach pins from the Arduino Mega board to the Servo objects. // Starting from pin 22, there happen to be exactly 32 pins on the double row pins. for( int i=0; i<NUM_SERVOS; i++) { myServo[i].attach( i + 22); // pi...
{ "version": 1, "author": "Generated", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": 270, "left": 185, "attrs": {} }, { "type": "wokwi-servo", "id": "servo31", "top": 241.47, "left": 594.24, "rotate": 34...
Generate a diagram.json code for LED matrix tunnel
// This version uses bit-banged SPI. // If you see tearing (jagged edges on the circles) try the version // which uses AVR's hardware SPI peripheral: // https://wokwi.com/arduino/projects/318868939929027156 #define CLK 13 #define DIN 11 #define CS 10 #define X_SEGMENTS 4 #define Y_SEGMENTS 4 #define NUM_SEGMENTS ...
{ "version": 1, "author": "sutaburosu", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": -177.58, "left": 252.33, "rotate": 90, "attrs": {} }, { "type": "wokwi-max7219-matrix", "id": "matrix1", "top": -126.7, ...
Generate a diagram.json code for mini piano
#include "pitches.h" #define SPEAKER_PIN 8 const uint8_t buttonPins[] = { 12, 11, 10, 9, 7, 6, 5, 4 }; const int buttonTones[] = { NOTE_C4, NOTE_D4, NOTE_E4, NOTE_F4, NOTE_G4, NOTE_A4, NOTE_B4, NOTE_C5 }; const int numTones = sizeof(buttonPins) / sizeof(buttonPins[0]); void setup() { for (uint8_t i = 0; i < nu...
{ "version": 1, "author": "Uri Shaked", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 185, "left": 71, "attrs": {} }, { "type": "wokwi-buzzer", "id": "buzzer", "top": 220, "left": 380, "rotate": 90, "attrs": { "volume": "0.2" } }...
Generate a diagram.json code for alarm clock with RTC
/** Arduino Digital Alarm Clock Copyright (C) 2020, Uri Shaked. Released under the MIT License. */ #include <SevSeg.h> #include "Button.h" #include "AlarmTone.h" #include "Clock.h" #include "config.h" const int COLON_PIN = 13; const int SPEAKER_PIN = A3; Button hourButton(A0); Button minuteButton(A1); But...
{ "version": 1, "author": "Uri Shaked", "editor": "wokwi", "parts": [ { "type": "wokwi-7segment", "id": "7segment", "top": -29.04, "left": 330.64, "rotate": 0, "hide": false, "attrs": { "commonPin": "anode", "digits": "4", "colon": "1" } }, { "type": "...
Generate a diagram.json code for electronic safe
/** Arduino Electronic Safe Copyright (C) 2020, Uri Shaked. Released under the MIT License. */ #include <LiquidCrystal.h> #include <Keypad.h> #include <Servo.h> #include "SafeState.h" #include "icons.h" /* Locking mechanism definitions */ #define SERVO_PIN 6 #define SERVO_LOCK_POS 20 #define SERVO_UNLOCK_...
{ "version": 1, "author": "Uri Shaked", "editor": "wokwi", "parts": [ { "id": "uno", "type": "wokwi-arduino-uno", "top": 200, "left": 20 }, { "id": "keypad", "type": "wokwi-membrane-keypad", "left": 360, "top": 140 }, { "id": "servo", "type": "wokwi-servo", ...
Generate a diagram.json code for nano pong
/* A simple Pong game. https://notabug.org/Maverick/WokwiPong Based on Arduino Pong by eholk https://github.com/eholk/Arduino-Pong */ #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define UP_BUTTON 2 #define DOWN_BUTTON 3 const unsigned long PADDLE_RATE = 64; c...
{ "version": 1, "author": "Maverick", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-nano", "id": "nano", "top": 0, "left": 0, "attrs": {} }, { "type": "board-ssd1306", "id": "oled1", "top": 89.5, "left": 19.05, "attrs": {} }, { "type": "wokwi-pushbutton", "id": "btn1", "to...
Generate a diagram.json code for touch lcd breakout game
#include <SD.h> #include <adafruit_1947_Obj.h> #include <screen.h> #include "ourOSObj.h" ourOSObj ourOS; void setup() { Serial.begin(57600); // Fire up serial for debugging. if (!initScreen(ADAFRUIT_1947,ADA_1947_SHIELD_CS,PORTRAIT)) { // Init screen. Seria...
{ "version": 1, "author": "Jim Lee", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-mega", "id": "mega", "top": 272.86, "left": -34.52, "attrs": { "__fakeRamSize": "65000" } }, { "type": "board-ili9341-cap-touch", "id": "lcd1", "top": -149.52, ...
Generate a diagram.json code for dino game
// A simple T-rex Run game based on the 30DLIS kit // Developed by Ishani and Arijit Sengupta // Required libraries #include <U8glib.h> #include "TM1637Display.h" // HW Pins required #define SW 3 // RotaryEncoder SW Pin #define DT 4 // RotaryEncoder DT Pin #define CLK 2 // RotaryEncoder CLK Pin // Define the display ...
{ "version": 1, "author": "Ami Sung", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 90.93, "left": -190.84, "attrs": {} }, { "type": "board-ssd1306", "id": "oled1", "top": 121.27, "left": 158.38, "attrs": {} }, { "type": "wokwi-ky-040", "id": "encoder1", "top": 268...
Generate a diagram.json code for Four LED blink series
int led5=5; int led6=6; int led7=7; int led8=8; void setup() { pinMode(led5,OUTPUT); pinMode(led6,OUTPUT); pinMode(led7,OUTPUT); pinMode(led8,OUTPUT); Serial.begin(9600); } void loop() { digitalWrite(led5,HIGH); digitalWrite(led6,LOW); digitalWrite(led7,LOW); digitalWrite(led8,LOW); delay(500); ...
{ "version": 1, "author": "salwa nafisya9.3", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 106.2, "left": 18.6, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -42, "left": 263, "attrs": { "color": "red" } }, { "type": "wokwi-led", "id": "led2", "top": ...
Generate a diagram.json code for test Arduino
int TIME_INTERVAL = 0; bool isReady = false; void setup() { // put your setup code here, to run once: pinMode(13, OUTPUT); } void loop() { // put your main code here, to run repeatedly: TIME_INTERVAL++; digitalWrite(13, LOW); if(TIME_INTERVAL == 500) { isReady = true; TIME_INTERVAL = 0; } ...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": 9, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -70.8, "left": 109.4, "attrs": { "color": "red" } } ], "connectio...
Generate a diagram.json code for SUP_LCD
#include <Arduino.h> #include "timer_System.h" #include "inps_manager.h" #include "asciitohex.h" #define VIEW_MENU 1 #define INC_MENU 2 #define DEC_MENU 3 const int KEY_MENU = 7; const int KEY_INC = 8; const int KEY_DEC = 9; const int DIGIT_1 = 6; const int DIGIT_2 = 5; const int DIGIT_3 = 4;const int DATA_SPI ...
{ "version": 1, "author": "Mauricio Bautista", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-nano", "id": "nano", "top": 120, "left": 28.3, "attrs": {} }, { "type": "wokwi-7segment", "id": "sevseg1", "top": -109.38, "left": -104.76, "attrs": { "digits": "3", "colon...
Generate a diagram.json code for temperature control system using arduino
#include <Wire.h> #include <LiquidCrystal_I2C.h> #include <OneWire.h> #include <DallasTemperature.h> #include <RTClib.h> #include <Encoder.h> // Pin Definitions #define BLUE 7 // Start indecator Blue LED #define RED 12 // Holding high temp indecator Red LED #define YELOW 8 // Hold...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0, "left": 0, "attrs": {} }, { "type": "board-ds18b20", "id": "temp1", "top": 75.67, "left": -159.12, "attrs": {} }, { "type": "wokwi-lcd2004", "id": "lcd1", ...
Generate a diagram.json code for Gost28147
#include <Arduino.h> // Default S-Box (GOST 28147-89 standard) uint8_t S_BOX[8][16] = { {4, 10, 9, 2, 13, 8, 0, 14, 6, 11, 1, 12, 7, 15, 5, 3}, {14, 11, 4, 12, 6, 13, 15, 10, 2, 3, 8, 1, 0, 7, 5, 9}, {5, 8, 1, 13, 10, 3, 4, 2, 14, 15, 12, 7, 6, 0, 9, 11}, {7, 13, 10, 1, 0, 8, 9, 15, 14, 4, 6, 12, 11, 2...
{ "version": 1, "author": "Programmer GPT", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0, "left": 0, "attrs": {} } ], "connections": [], "dependencies": {} }
Generate a diagram.json code for Three LED blink in series
#define RED_LED 7 #define GREEN_LED 6 #define BLUE_LED 5 void setup() { pinMode(RED_LED, OUTPUT); pinMode(GREEN_LED, OUTPUT); pinMode(BLUE_LED, OUTPUT); } void loop() { digitalWrite(RED_LED, HIGH); digitalWrite(GREEN_LED, LOW); digitalWrite(BLUE_LED, LOW); delay(1000); digitalWrite(RED_LED, LOW); ...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-breadboard-half", "id": "bb1", "top": -12.6, "left": 300.4, "attrs": {} }, { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": 37.8, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -3.6...
Generate a diagram.json code for piano using arduino
#include "pitches.h" #define SPEAKER_PIN 8 const uint8_t buttonPins[]={12,11,10,9,8,7,6,5,4}; const int buttonTones[]={ NOTE_C4, NOTE_D4, NOTE_E4, NOTE_F4, NOTE_G4, NOTE_A4, NOTE_B4, NOTE_C5 }; const int numTones= sizeof(buttonPins) / sizeof (buttonPins[0]); void setup() { int pitch=0;// put your setup code her...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-buzzer", "id": "bz1", "top": -55.2, "left": 366.6, "attrs": { "volume": "0.1" } }, { "ty...
Generate a diagram.json code for sequential LED tower
void setup() { pinMode(10, OUTPUT); pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); pinMode(6, OUTPUT); pinMode(5, OUTPUT); pinMode(4, OUTPUT); pinMode(3, OUTPUT); pinMode(2, INPUT_PULLUP); // put your setup code here, to run once: } void loop() { int pb1=digitalRead(2); if(pb1==L...
{ "version": 1, "author": "Mas Wan", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": -0.6, "attrs": {} }, { "type": "wokwi-pushbutton", "id": "btn1", "top": -61, "left": 19.2, "attrs": { "color": "green" } }, { "ty...
Generate a diagram.json code for modern turn lights motorcycles using arduino
//Modern turn lights v.3.1.0 for scooters and motorcycles with arduino and ws2812b - by Fedaceag Ionut ( Youtube - Think small, build big! ) #include <FastLED.h> //FastLed library version 3.2.1 - https://github.com/FastLED/FastLED/wiki/Overview or http://fastled.io/ with NEOPIXEL or WS2812B #defi...
{ "version": 1, "author": "Usama Shafiq", "editor": "wokwi", "parts": [ { "type": "wokwi-breadboard-half", "id": "bb1", "top": -214.2, "left": 156.4, "attrs": {} }, { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": -0.6, "attrs": {} }, { "type": "wokwi-led-ring", "id": "rin...
Generate a diagram.json code for LED sequence
void setup() { pinMode(13, OUTPUT); pinMode(7, OUTPUT); pinMode(1, OUTPUT); } void loop() { digitalWrite(13, HIGH); delay(2000); digitalWrite(7, HIGH); delay(2000); digitalWrite(1, HIGH); delay(1000); digitalWrite(13, LOW); digitalWrite(7, LOW); digitalWrite(1, LOW); delay(1000); }
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -90, "left": 99.8, "attrs": { "color": "red" } }, { "type": "wokwi-led", "id": "led2", ...
Generate a diagram.json code for window control using arduino
#include <Arduino.h> #include "Button.h" #include "ServoMotor.h" #include "Potentiometer.h" #include "MsgService.h" #include "Lcd.h" #define button_pin 2 #define pot_pin A0 #define servo_pin 10 int lastPercentage = 0; int percentage = 0; int temperature = 0; Button* btn; ServoMotor* window; Potentiometer* potentiome...
{ "version": 1, "author": "Keni Tafili", "editor": "wokwi", "parts": [ { "type": "wokwi-breadboard-half", "id": "bb1", "top": -60.6, "left": 146.8, "attrs": {} }, { "type": "wokwi-arduino-uno", "id": "uno", "top": -57, "left": -231, "attrs": {} }, { "type": "wokwi-servo", "id": "servo1", "top": -194...
Generate a diagram.json code for Simple LED blink using arduino
int led = 11; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); }
{ "version": 1, "author": "Julian Manders-Jones", "editor": "wokwi", "parts": [ { "type": "wokwi-breadboard", "id": "bb1", "top": 93, "left": 70, "attrs": {} }, { "type": "wokwi-arduino-uno", "id": "uno", "top": -124.2, "left": 354.6, "attrs": {} }, { "type": "wokwi-led", "id": "led1", ...
Generate a diagram.json code for relay control
int i = 0; void setup() { pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); } void loop() { if (digitalRead(4) == 0) { digitalWrite(2, HIGH); } else if (digitalRead(5) == 0) { digitalWrite(2, HIGH); digitalWrite(3, HIG...
{ "version": 1, "author": "Барсук Иванов", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-nano", "id": "nano", "top": 4.8, "left": -58.1, "attrs": {} }, { "type": "wokwi-relay-module", "id": "relay1", "top": -86.2, "left": 96, "attrs": {} }, { "type": "wokwi-relay-module", "id": "relay2", "t...
Generate a diagram.json code for Traffic light control
int Knop = A3; int RED_LED = A0; int GREEN_LED = A2; int YELLOW_LED = A1; typedef enum {Rood, Groen, Geel} states; static states state = Rood; // Constante voor de duur van geel const int geelDuur = 4000; int geelStartTijd = 0; // Tijd in milliseconden voor geel void setup() { pinMode(Knop, INPUT_PULLUP); pinM...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": -105, "left": -0.6, "attrs": {} }, { "type": "wokwi-rgb-led", "id": "rgb1", "top": 90.4, "left": -114.1, "attrs": { "common": "cathode" } }, ...
Generate a diagram.json code for motor control
#include <LiquidCrystal.h> #define thermocouple A2 #define PRIV 13 #define ENTER 12 #define Next 11 #define Limit 10 #define Heater 8 #define stepPin A4 #define dirPin A3 //Temperature initialization int Temperature = 0; int SetTemperature = 300; int adc_val; byte ShowTemp = 0; byte HeaterCond=0; //Motor initializat...
{ "version": 1, "author": "negs electronics", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 106.2, "left": -39, "attrs": {} }, { "type": "wokwi-lcd1602", "id": "lcd1", "top": -82.97, "left": 25.6, "attrs": {} }, { "type": "wokwi-pushbutton", "id": "btn1...
Generate a diagram.json code for inbuilt LED blink
int led = 13; void setup() { pinMode(led,OUTPUT); } void loop() { digitalWrite(led,HIGH); delay(500); digitalWrite(led,LOW); delay(500); }
{ "version": 1, "author": "8.9 Fikri nur Fauzi Siswanto", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": -0.6, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -42, "left": 99.8, "attrs": { "color": "red" } } ], "connections": [ [ "led1:C", "u...
Generate a diagram.json code for wifi scanning using ESP32
/* ESP32 WiFi Scanning example */ #include "WiFi.h" void setup() { Serial.begin(115200); Serial.println("Initializing WiFi..."); WiFi.mode(WIFI_STA); Serial.println("Setup done!"); } void loop() { Serial.println("Scanning..."); // WiFi.scanNetworks will return the number of networks found int n = WiFi...
{ "version": 1, "author": "Uri Shaked", "editor": "wokwi", "parts": [ { "type": "board-esp32-devkit-c-v4", "id": "esp", "top": 0, "left": 0, "attrs": {} } ], "connections": [ [ "esp:TX", "$serialMonitor:RX", "", [] ], [ "esp:RX", "$serialMonitor:TX", "", [] ] ] }
Generate a diagram.json code for NTP clock
// Learn about the ESP32 WiFi simulation in // https://docs.wokwi.com/guides/esp32-wifi #include <WiFi.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C LCD = LiquidCrystal_I2C(0x27, 16, 2); #define NTP_SERVER "pool.ntp.org" #define UTC_OFFSET 0 #define UTC_OFFSET_DST 0 void spinner() { ...
{ "version": 1, "author": "Anonymous maker", "editor": "wokwi", "parts": [ { "type": "board-esp32-devkit-c-v4", "id": "esp", "top": -76.8, "left": 43.24, "attrs": {} }, { "type": "wokwi-lcd1602", "id": "lcd1", "top": -70.4, "left": 188, "attrs": { "pins": "i2c" } } ],...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5