Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Smoothie by
main.cpp@0:31e91bb0ef3c, 2012-07-31 (annotated)
- Committer:
- scachat
- Date:
- Tue Jul 31 21:11:18 2012 +0000
- Revision:
- 0:31e91bb0ef3c
- Child:
- 2:1df0b61d3b5a
smoothie port to mbed online compiler
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| scachat | 0:31e91bb0ef3c | 1 | /* |
| scachat | 0:31e91bb0ef3c | 2 | This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). |
| scachat | 0:31e91bb0ef3c | 3 | Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |
| scachat | 0:31e91bb0ef3c | 4 | Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| scachat | 0:31e91bb0ef3c | 5 | You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. |
| scachat | 0:31e91bb0ef3c | 6 | */ |
| scachat | 0:31e91bb0ef3c | 7 | |
| scachat | 0:31e91bb0ef3c | 8 | #include "libs/Kernel.h" |
| scachat | 0:31e91bb0ef3c | 9 | #include "modules/tools/laser/Laser.h" |
| scachat | 0:31e91bb0ef3c | 10 | #include "modules/tools/spindle/Spindle.h" |
| scachat | 0:31e91bb0ef3c | 11 | #include "modules/tools/extruder/Extruder.h" |
| scachat | 0:31e91bb0ef3c | 12 | #include "modules/tools/temperaturecontrol/TemperatureControlPool.h" |
| scachat | 0:31e91bb0ef3c | 13 | #include "modules/robot/Player.h" |
| scachat | 0:31e91bb0ef3c | 14 | #include "modules/utils/simpleshell/SimpleShell.h" |
| scachat | 0:31e91bb0ef3c | 15 | #include "modules/utils/configurator/Configurator.h" |
| scachat | 0:31e91bb0ef3c | 16 | #include "modules/utils/currentcontrol/CurrentControl.h" |
| scachat | 0:31e91bb0ef3c | 17 | #include "modules/utils/pausebutton/PauseButton.h" |
| scachat | 0:31e91bb0ef3c | 18 | //#include "libs/ChaNFSSD/SDFileSystem.h" |
| scachat | 0:31e91bb0ef3c | 19 | #include "libs/Config.h" |
| scachat | 0:31e91bb0ef3c | 20 | #include "libs/nuts_bolts.h" |
| scachat | 0:31e91bb0ef3c | 21 | #include "libs/utils.h" |
| scachat | 0:31e91bb0ef3c | 22 | |
| scachat | 0:31e91bb0ef3c | 23 | //#include "libs/USBCDCMSC/USBCDCMSC.h" |
| scachat | 0:31e91bb0ef3c | 24 | LocalFileSystem local("local"); |
| scachat | 0:31e91bb0ef3c | 25 | //SDFileSystem sd(p5, p6, p7, p8, "sd"); // LPC17xx specific : comment if you are not using a SD�card ( for example with a mBed ). |
| scachat | 0:31e91bb0ef3c | 26 | //LocalFileSystem local("local"); // LPC17xx specific :�comment if you are not running a mBed |
| scachat | 0:31e91bb0ef3c | 27 | //USBCDCMSC cdcmsc(&sd); // LPC17xx specific :�Composite serial + msc USB device |
| scachat | 0:31e91bb0ef3c | 28 | |
| scachat | 0:31e91bb0ef3c | 29 | int main() { |
| scachat | 0:31e91bb0ef3c | 30 | |
| scachat | 0:31e91bb0ef3c | 31 | Kernel* kernel = new Kernel(); |
| scachat | 0:31e91bb0ef3c | 32 | |
| scachat | 0:31e91bb0ef3c | 33 | kernel->serial->printf("Smoothie ( grbl port ) version 0.6.1_mbed \r\n"); |
| scachat | 0:31e91bb0ef3c | 34 | |
| scachat | 0:31e91bb0ef3c | 35 | |
| scachat | 0:31e91bb0ef3c | 36 | |
| scachat | 0:31e91bb0ef3c | 37 | //kernel->add_module( new Laser(p21) ); |
| scachat | 0:31e91bb0ef3c | 38 | //kernel->add_module( new Extruder() ); |
| scachat | 0:31e91bb0ef3c | 39 | kernel->add_module( new Spindle() ); |
| scachat | 0:31e91bb0ef3c | 40 | kernel->add_module( new SimpleShell() ); |
| scachat | 0:31e91bb0ef3c | 41 | kernel->add_module( new Configurator() ); |
| scachat | 0:31e91bb0ef3c | 42 | kernel->add_module( new CurrentControl() ); |
| scachat | 0:31e91bb0ef3c | 43 | kernel->add_module( new TemperatureControlPool() ); |
| scachat | 0:31e91bb0ef3c | 44 | kernel->add_module( new PauseButton() ); |
| scachat | 0:31e91bb0ef3c | 45 | |
| scachat | 0:31e91bb0ef3c | 46 | //kernel->add_module( &cdcmsc ); |
| scachat | 0:31e91bb0ef3c | 47 | |
| scachat | 0:31e91bb0ef3c | 48 | kernel->serial->printf("start\r\n"); |
| scachat | 0:31e91bb0ef3c | 49 | |
| scachat | 0:31e91bb0ef3c | 50 | while(1){ |
| scachat | 0:31e91bb0ef3c | 51 | kernel->call_event(ON_MAIN_LOOP); |
| scachat | 0:31e91bb0ef3c | 52 | kernel->call_event(ON_IDLE); |
| scachat | 0:31e91bb0ef3c | 53 | } |
| scachat | 0:31e91bb0ef3c | 54 | } |
