A modern, web-based integrated development environment for WebScreen devices with dual theme support, providing serial communication, code editing, and command execution capabilities.
- Serial Communication: Direct Web Serial API connection to WebScreen devices
- Dual Theme System: Switch between "Retro" (amber phosphor) and "Focus" (VS Code-like) themes
- Tabbed Interface: Organized workspace with Serial Console, JavaScript Editor, and File Manager
- URL Theme Selection: Set theme via URL parameter (
?mode=retro
or?mode=focus
) - Real-time Terminal: Live serial console with command history and auto-completion
- File Management: Upload, list, download, and manage files on the device
- Syntax Highlighting: JavaScript syntax highlighting with theme-appropriate colors
- IntelliSense: Auto-completion with WebScreen API suggestions
- Line Numbers: Easy navigation with contextual line numbering
- Bracket Matching: Automatic bracket pairing and highlighting
- Code Folding: Collapse code blocks for better navigation
- Search & Replace: Built-in search functionality (Ctrl+F)
- Keyboard Shortcuts:
Ctrl+S
: Save file to deviceF5
: Run script on deviceCtrl+/
: Toggle commentsCtrl+Space
: Trigger autocomplete
- Amber Phosphor Colors: Classic orange/yellow terminal aesthetic
- Scan Line Effects: Authentic CRT monitor simulation
- Glowing Elements: Neon effects on buttons and text
- Terminal Animation: Animated background with retro styling
- VS Code Inspired: Clean, modern development environment
- Reduced Eye Strain: Muted colors perfect for long coding sessions
- No Animations: Distraction-free interface
- Professional Layout: Clean typography and spacing
All WebScreen serial commands are supported with auto-completion:
- Core:
/help
,/stats
,/info
,/reboot
- File Operations:
/write
,/ls
,/cat
,/rm
- Network:
/wget
,/ping
- Configuration:
/config get/set
,/backup
- Monitoring:
/monitor cpu/mem/net
- Script Management:
/load
,/run
- Responsive Design: Works on desktop and tablet devices
- Tabbed Workspace: Separate areas for console, editor, and files
- Quick Commands: One-click access to common WebScreen commands
- API Documentation: Built-in reference for WebScreen JavaScript API
- Status Bar: Real-time connection info with WebScreen branding
- Credits Section: Creative Commons licensing information
- Browser: Chrome, Edge, or Opera (Web Serial API support required)
- WebScreen Device: Connected via USB with serial commands firmware
-
Open the IDE
Open index.html in a supported browser
-
Choose Theme (Optional)
Add theme parameter to URL: - file:///path/to/index.html?mode=retro (amber phosphor theme) - file:///path/to/index.html?mode=focus (clean development theme)
-
Connect Device
- Click "Connect Device" button
- Select your WebScreen device from the serial port list
- Wait for successful connection
-
Navigate Interface
- Serial Console: Direct command-line interaction
- JavaScript Editor: Write and edit WebScreen applications
- File Manager: Browse and manage device files
-
Write Code
- Use the JavaScript editor with full syntax highlighting
- Take advantage of WebScreen API autocomplete
- Save your work with Ctrl+S or the Save button
-
Execute Commands
- Use the terminal to execute serial commands
- Try quick commands like
/stats
or/help
- Upload and run scripts with F5 or the Run button
// Simple WebScreen application
create_label_with_text('Hello WebScreen!');
set_background_color('#2980b9');
// Network example
wifi_connect('MyNetwork', 'password');
let weather = http_get('https://api.weather.com/current');
let temp = parse_json_value(weather, 'temperature');
create_label_with_text('Temperature: ' + temp + '°C');
// Storage example
sd_write_file('/config.txt', 'My configuration');
let config = sd_read_file('/config.txt');
print('Config loaded: ' + config);
// Graphics example
draw_rect(50, 50, 100, 100, '#ff6b6b');
create_image('logo.png');
1. Choose your preferred theme (Retro for creative work, Focus for long sessions)
2. Write JavaScript code in the editor with API autocomplete
3. Press F5 to upload and run immediately
4. See results on WebScreen display
5. Iterate quickly without SD card swapping
1. Switch to File Manager tab
2. Use /ls to see existing files
3. Save scripts with custom filenames
4. Download files for backup
5. Load different applications with /load
1. Use Serial Console for real-time monitoring
2. Use /stats to monitor memory usage
3. Use /monitor for continuous system stats
4. Use /ping to test network connectivity
5. Debug issues with live serial output
URL Parameters:
- ?mode=retro - Amber phosphor terminal theme
- ?mode=focus - Clean VS Code-like theme
Button Toggle:
- Click theme button in header to switch themes
- Theme preference is saved automatically
- Frontend: Vanilla JavaScript with CodeMirror editor
- Serial Communication: Web Serial API for device connection
- Theming: CSS custom properties with dual-theme system
- UI Framework: Tabbed interface with responsive design
- No Backend: Pure client-side application
- CSS Variables: Dynamic theme switching using custom properties
- LocalStorage: Theme preference persistence
- URL Parameters: Direct theme selection via query strings
- CodeMirror Integration: Editor themes sync with UI themes
- ✅ Chrome 89+: Full support
- ✅ Edge 89+: Full support
- ✅ Opera 75+: Full support
- ❌ Firefox: No Web Serial API support
- ❌ Safari: No Web Serial API support
WebScreen-Serial-IDE/
├── index.html # Main HTML with tabbed interface
├── style.css # Dual-theme CSS system
├── serial.js # Serial communication manager
├── app.js # Main application with theme management
├── assets/
│ ├── animation.gif # Terminal animation for retro theme
│ ├── logo.png # WebScreen logo
│ └── favicon.ico # Browser favicon
└── README.md # This documentation
Core serial communication functionality:
// Connection management
await serial.connect()
await serial.disconnect()
// Command execution with auto-completion
await serial.sendCommand('/help')
await serial.sendFile('script.js', content)
// WebScreen specific methods
await serial.getStats()
await serial.listFiles()
await serial.loadScript('app.js')
await serial.backup('save', 'production')
Main application controller with theme management:
// Editor operations
ide.saveFile()
ide.runScript()
ide.clearTerminal()
// Theme management
ide.loadTheme() // Load theme from URL or localStorage
ide.setTheme('retro') // Set specific theme
ide.toggleTheme() // Switch between themes
// UI management
ide.switchTab('files') // Switch between Console/Editor/Files
ide.updateConnectionStatus(connected)
ide.appendToTerminal(message, className)
// URL parameter theme selection
// ?mode=retro or ?mode=focus
// Manual theme switching
const ide = window.webScreenIDE;
ide.setTheme('retro'); // Amber phosphor theme
ide.setTheme('focus'); // VS Code theme
Modify CSS custom properties to create new themes:
[data-theme="custom"] {
--color-primary: #00ff00;
--bg-primary: #001100;
--shadow-glow: 0 0 10px #00ff00;
/* ... other theme variables */
}
Add custom commands by modifying the HTML:
<button class="cmd-btn" data-cmd="/custom command">Custom</button>
Modify keyboard shortcuts and editor behavior:
extraKeys: {
'Ctrl-R': () => this.runScript(),
'Ctrl-Shift-S': () => this.saveAs(),
'F1': () => this.showHelp(),
}
- Device not found: Ensure WebScreen is connected via USB and drivers are installed
- Permission denied: Try disconnecting and reconnecting the device
- Port busy: Close other serial applications (Arduino IDE, etc.)
- Theme not loading: Check URL parameter spelling (
mode=retro
ormode=focus
) - Theme not persisting: Ensure localStorage is enabled in browser
- Mixed theme elements: Hard refresh the page (Ctrl+F5)
- Syntax highlighting not working: Check if JavaScript mode is loaded
- Autocomplete not working: Ensure show-hint addon is loaded
- Slow performance: Clear terminal history or reduce editor content
- Commands not working: Verify device is running serial commands firmware
- Garbled output: Check baud rate (should be 115200)
- Timeout errors: Ensure stable USB connection
create_label_with_text('text')
- Creates a text label on screencreate_image('filename')
- Display an image fileset_background_color('#color')
- Set screen background colordraw_rect(x, y, w, h, color)
- Draw a colored rectangle
wifi_connect('ssid', 'pass')
- Connect to WiFi networkhttp_get('url')
- Perform HTTP GET requesthttp_post('url', data)
- Perform HTTP POST request
sd_write_file('path', data)
- Write data to SD card filesd_read_file('path')
- Read data from SD card filesd_list_files('/')
- List files in directory
delay(milliseconds)
- Pause execution for specified timeprint(message)
- Output message to serial consoleparse_json_value(json, key)
- Extract value from JSON stringget_timestamp()
- Get current unix timestamp
- Clone the repository
- Open
index.html
in a supported browser - Connect a WebScreen device for testing
- Test both themes with URL parameters
- Make modifications and test locally
- New Themes: Extend CSS custom properties system
- New Commands: Add to SerialManager class methods
- UI Components: Modify HTML structure and CSS styling
- Editor Features: Extend CodeMirror configuration
Type | Resource | Description |
---|---|---|
🐛 Bug Reports | GitHub Issues | Report bugs and request features |
💬 Discussions | GitHub Discussions | Ask questions and share ideas |
📖 Documentation | docs/ | API reference and guides |
🌐 Website | WebScreen.cc | Official project website |
🛒 Hardware | CrowdSupply | Purchase WebScreen hardware |
If WebScreen has been useful for your projects:
- ⭐ Star the repo to show your support
- 🍴 Fork and contribute to make it better
- 🐛 Report issues to help us improve
- 📖 Improve documentation for other users
- 💰 Sponsor development to fund new features
This project is open source. See the LICENSE file for details.