comingle / ossex Goto Github PK
View Code? Open in Web Editor NEWArduino library for Comingle Multivibe Toys. Needed for the Mod sketch.
License: MIT License
Arduino library for Comingle Multivibe Toys. Needed for the Mod sketch.
License: MIT License
Currently pattern functions set a global step
array of {motorNumber, motorPower, stepTime}
for the next vibration pattern step to be run.
You can currently only set one motor change per step. Ideally you'd be able to update all motors at once in a given step.
Considerations:
{ {m1power, m1time}, {m2power, m2time} }...
)? Do we consider each motor's step time as happening sequentially or all step times initiating at the start of the step? Eg: to turn the motors on to 200 power with 100ms offsets from each other do we do: { {200, 100}, {200, 100}, {200, 100} }
OR { {200, 100}, {200, 200}, {200, 300} }
? They seem roughly equivalent right now, but both seem conceptually tricky.{ {motors}, {powers}, time }
. Issue is then how to structure the data to handle cases where we're updating only one motor or updating all 3. Maybe like:struct {
bool motor[3];
unsigned int power[3];
unsigned int time;
} step;
So then each step can update the motors like so:
for (int i = 0; i < 3; i++) {
if (step.motor[i]) {
Toy.setOutput(i, step.power[i]);
}
}
People can then write pattern functions that set Step
or Toy.step
:
function myPattern() {
Step.motor[0] = true;
Step.power[0] = 200;
if (random(2) % 2) {
Step.motor[1] = true;
Step.power[1] = random(255);
} else {
Step.motor[1] = false;
}
Step.time = 400;
}
๐ ๐
Hi,
I tried to play a little bit for an own toy with the library. And individually the functions of it are great and work. But when I try to to work with the full Mod Sketch I only can get the button to work when I include the Onebutton Library into the mod_vibrator.ino , define the pin there and changing the set.up buttons clicks. At least the single click function for switching patterns is working then. But the increase or decrease not.
Maybe there is something wrong with pulling the defined pin in the ossex.cpp file. Could you help me out here? Would love to get it fully going.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.