This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/revarbat/BOSL/wiki/masks.scad#fillet | |
include <BOSL/constants.scad> | |
use <BOSL/masks.scad> | |
test = true; | |
///////////////////// | |
vial_diameter = 16.75; // Diameter of the vials in mm | |
vial_height = 40; // Height of the vials in mm | |
vial_width = 16.5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Mouse.h" | |
void setup() { | |
Mouse.begin(); | |
// Give it a sec to initialise, or we miss the first jiggle when it's plugged in | |
delay(5000); | |
} | |
int shift = 5; | |
int instdelay = 50; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://gist.github.com/sowbug/40148c249136a037cc3b4b814e9de129 for try #1 | |
// | |
// https://github.com/iced-rs/iced/discussions/1600 for more background | |
use iced::{ | |
executor, time, | |
widget::{button, column, container, text}, | |
window, Application, Command, Event as IcedEvent, Settings, Theme, | |
}; | |
use iced_native::futures::channel::mpsc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use iced::{ | |
executor, time, | |
widget::{button, column, container, text}, | |
window, Application, Command, Event as IcedEvent, Settings, Theme, | |
}; | |
use iced_native::futures::channel::mpsc; | |
use iced_native::subscription::{self, Subscription}; | |
use std::thread::JoinHandle; | |
enum ThingSubscriptionState { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use iced::Sandbox; | |
use iced::{button, Alignment, Button, Column, Container, Element, Settings, Text}; | |
use std::cell::RefCell; | |
use std::rc::{Rc, Weak}; | |
pub fn main() -> iced::Result { | |
Counter::run(Settings::default()) | |
} | |
#[derive(Debug, Clone, Copy)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diff ../iced/examples/counter/src/main.rs src/main.rs | |
1,3c1,4 | |
< use iced::{ | |
< button, Alignment, Button, Column, Element, Sandbox, Settings, Text, | |
< }; | |
--- | |
> use iced::Sandbox; | |
> use iced::{button, Alignment, Button, Column, Container, Element, Settings, Text}; | |
> use std::cell::RefCell; | |
> use std::rc::Rc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use iced::Sandbox; | |
use iced::{button, Alignment, Button, Column, Container, Element, Settings, Text}; | |
use std::cell::RefCell; | |
use std::rc::Rc; | |
pub fn main() -> iced::Result { | |
Counter::run(Settings::default()) | |
} | |
#[derive(Debug, Default)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
CONCEPTS = [ | |
'baby', | |
'bacon', | |
'cabbage', | |
'cat', | |
'cauldron', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Given a bunch of MP3 files in directories, | |
# copies them into a file tree that is | |
# compatible with DFPlayer. | |
import os | |
import shutil | |
src_dir = './sfx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For Heltec Wifi Kit 8 | |
// Code stolen/adapted from many sources | |
#include <U8g2lib.h> | |
#include <ArduinoJson.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecure.h> | |
#include <ESP8266HTTPClient.h> | |
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 16, /* clock=*/ 5, /* data=*/ 4); |
NewerOlder