marcusrugger / mybot Goto Github PK
View Code? Open in Web Editor NEWCode for playing around with my Makeblock mBot.
Code for playing around with my Makeblock mBot.
The scheduler needs to be able to run a task after a specified period of time has elapsed. Using a timer subject, which can be scheduled should do the job.
Uses included being able to run the motors for a specific period of time, support blinking LEDs, or timeout on waiting for input.
The problem with using simple Serial for output logging information is they have to be commented in and out based on if they're needed.
Need a way to keep logging statements in the code and turn them on and off at run time. Some sort of level support would be nice too.
Upon closer evaluation, I've decided I want the builder and factory classes to be separate. The factory should be a true abstract factory and the builder should use the factory. As they are, they're kind of confused together.
Need to be able to have some control over the speed of the motors. I think just a few values will suffice:
SPEED_FAST
SPEED_MEDIUM
SPEED_SLOW
There's a bug in the scheduler when the currently running task unschedules itself. Unschedule will remove the task, but the next task will be skipped because 'i' in run() will be incremented.
The correct fix would be to use a true list class with iterators.
It would be very nice to be able to use the remote to control mybot.
The command queue should use a latching mechanism for determining when it's OK to execute the next command. That way, it can latch on anything, besides just elapsed time.
class Latch
{
public:
bool isLatched(void) = 0;
};
The scheduler and subject classes use lists. A proper list class is required.
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.