3D Controller Bot

Intel Edison expands a new 3-D printer market.

ExpertFull instructions provided21,377
3D Controller Bot

Things used in this project

Hardware components

Relay (generic)
×1
Fan
×1
Temp Sensor
×1
Ramps 1.4
×1
LED Light
×1
Web Cam
×1
5 Stepper Motors
×1
Hotend
×1
Heatbed
×1
Arduino Mega 2560
Arduino Mega 2560
×1
Thermistors
×1
Aluminum extrusion
×1
600 watt power supply
×1
Proximity sensor
×1
Screws, Bolts, Wires, Zip ties
×1
RepRap Wilson 3D printed parts
×1
Aluminum Sheets
×1
120mm Cooling Fan
×1
Cooling Fans
×1

Hand tools and fabrication machines

Octoprint
3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Diagram

Code

server.js

JavaScript
express = require('express');
app = express();
http = require('http');
path= require('path');
join = path.join;
bodyParser = require('body-parser');
app.use(bodyParser.json());

var n = require('mraa');
var fanPin  = new m.gpio(4);
var lightPIn = new m.gpio(8);

fanPin.dir(m.DIR_OUT);
lightPin.dir(m.DIR_OUT);


Port = Number(process.env.Port ) || 1104 ;

app.use(express.static( __dirname + '/public'));


app.get('/',  function (request, response, next){
	console.log('A');
	indexPage = __dirname +'/public/index.html';
	response.status(200).sendFile(indexPage);

});

httpServer = http.createServer(app);

httpServer.listen(Port, function(){
	console.log('Server running on '+ Port)
});

var router = express.Router();

app.use('/api', router);


router.route("/fanOn").post(function(req, res, next) {
	fanPin.write(1);
	console.log(" fan is on");
});

router.route("/fanOff").post(function(req, res, next) {
	fanPin.write(0);
	console.log(" fan is off");

});

router.route("/lightOn").post(function(req, res, next) {
	lightPin.write(1);
	console.log("light is on ...");
});

router.route("/lightOff").post(function(req, res, next) {
	lightPin.write(0);
	console.log("light is off ");
});

index.html

HTML
<!DOCTYPE html>
<html>
<head>

<title> hackster workshop  </title>

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="./index.js"></script>
 <script type="text/javascript">
 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>


  
 </script>

</script>
</head>

<body>
    <h1> welcome to our 3D printining Adds on <h1/>

<p>
    Controlling Fan : 
	<input type="submit" id="button1on"  value="On" />
	<input type="submit" id="button1off"   value="Off"/>
</p>


<p>
    Controlling light :
	<input type="submit" id="button2on"   value="On"/>
	<input type="submit" id="button2off"   value="Off"/>
</p>

</body>
</html>

index.js

JavaScript
// $ = require('jquery');

$(document).ready(function(){

	$("#button1on").click(
   function()
    {
    	
		$.post( "http://localhost:1104/api/fanOn");
	});   


	$("#button1off").click(
   function()
    {
		$.post( "http://localhost:1104/api/fanOff");
	});  

	$("#button2on").click(
   function()
    {
		$.post( "http://localhost:1104/api/lightOn");
	});  

	$("#button2off").click(
   function()
    {
		$.post( "http://localhost:1104/api/lightOff");
	});  

});

uart.py

Python
GPIO Programming.
#!/usr/bin/env python

# Author: Brendan Le Foll <brendan.le.foll@intel.com>
# Copyright (c) 2015 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

import mraa

u = mraa.Uart(0)
print u.getDevicePath()

spi.py

Python
GPIO Programming.
#!/usr/bin/env python

# Author: Brendan Le Foll <brendan.le.foll@intel.com>
# Copyright (c) 2015 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

import mraa as m
import random as rand

# Excuse the super boring example, I was out of fun devices to play with, this
# will write and read the same data back to itself, a few 100 times, just short
# MISO & MOSI on your board

dev = m.Spi(0)

for x in range(0,100):
  txbuf = bytearray(4)
  for y in range(0,4):
    txbuf[y] = rand.randrange(0, 256)
  rxbuf = dev.write(txbuf)
  if rxbuf != txbuf:
    print("We have an error captain!")
    break
    exit(1)

cycle-pwm3.py

Python
Programming 110 electrical volt power relays.
#!/usr/bin/env python

# Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
# Copyright (c) 2014 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import mraa
import time

x = mraa.Pwm(3)
x.period_us(700)
x.enable(True)
value= 0.0

while True:
    x.write(value)
    time.sleep(0.05)
    value = value + 0.01
    if value >= 1:
        value = 0.0

aio.py

Python
GPIO Programming.
#!/usr/bin/env python

# Author: Brendan Le Foll <brendan.le.foll@intel.com>
# Copyright (c) 2014 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import mraa

print (mraa.getVersion())

try:
    x = mraa.Aio(0)
    print (x.read())
    print ("%.5f" % x.readFloat())
except:
    print ("Are you sure you have an ADC?")

blink-io8.py

Python
Light switch.
#!/usr/bin/env python

# Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
# Copyright (c) 2014 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import mraa
import time

x = mraa.Gpio(8)
x.dir(mraa.DIR_OUT)

while True:
    x.write(1)
    time.sleep(0.2)
    x.write(0)
    time.sleep(0.2)

Intel Galileo C#

C#
Intel board support for running C# using Mono.
https://galileo.codeplex.com/

OctoPrint

Web based 3D software. OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...). It is Free Software and released under the GNU Affero General Public License V3.

Marlin

3D Printer Firmware

Low Level Skeleton Library for Communication on GNU/Linux platforms

Execute web service commands to turn on additional fans, lights and temp sensors on Edison board. libmraa - Low Level Skeleton Library for Communication on GNU/Linux platforms Libmraa is a C/C++ library with bindings to javascript & python to interface with the IO on Galileo, Edison & other platforms, with a structured and sane API where port names/numbering matches the board that you are on. Use of libmraa does not tie you to specific hardware with board detection done at runtime you can create portable code that will work across the supported platforms. The intent is to make it easier for developers and sensor manufacturers to map their sensors & actuators on top of supported hardware and to allow control of low level communication protocol by high level languages & constructs.

Intel Galileo Developer

Lots of hardware setup scripts. From Bash, Wifi, useful links, sample code, developer setup and complete Debian Linux image. Galileo is previous generation many examples apply to the Edison. Repository will soon have more examples relating to the Intel Edison.

Marlin

Marlin configuration supporting RepRap 3D printers with working auto bed leveling. Repository has Configuration.h settings used for the 3D printer used at HacksterIO show. Marlin 3D Printer Firmware Marlin has a GPL license because I believe in open development. Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent. Quick Information This RepRap firmware is a mashup between Sprinter, grbl and many original parts. Derived from Sprinter and Grbl by Erik van der Zalm. Sprinters lead developers are Kliment and caru. Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl A fork by bkubicek for the Ultimaker was merged, and further development was aided by him. Some features have been added by: Lampmaker, Bradley Feldman, and others... Features: Interrupt based movement with real linear acceleration High steprate Look ahead (Keep the speed high when possible. High cornering speed) Interrupt based temperature protection preliminary support for Matthew Roberts advance algorithm For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html Full endstop support SD Card support SD Card folders (works in pronterface) SD Card autostart support LCD support (ideally 20x4) LCD menu system for autonomous SD card printing, controlled by an click-encoder. EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables many small but handy things originating from bkubicek's fork. Arc support Temperature oversampling Dynamic Temperature setpointing aka "AutoTemp" Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin Endstop trigger reporting to the host software. Updated sdcardlib Heater power reporting. Useful for PID monitoring. PID tuning CoreXY kinematics (www.corexy.com/theory.html) Delta kinematics Dual X-carriage support for multiple extruder systems Configurable serial port to support connection of wireless adaptors. Automatic operation of extruder/cold-end cooling fans based on nozzle temperature RC Servo Support, specify angle or duration for continuous rotation servos. Bed Auto Leveling. The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.

3DControllerBot

Complete source code published on github.

3DControllerBot

Complete source code.

RepRap Wilson

Reprap Wilson, 3D printer design Published under GPL v3 This is my reprap printer design, a derivative from Josef Prusa's i3 with the following goals: Replace the waterjet metal frame / wooden box frame with an inexpensive and rigid frame made from standard 2020 Aluminum Extrusion. To make the build volume parametric (easy to scale up or down by 50%), with a parametric BOM tool (spreedsheet) to assist in part selection. To simplify construction of the printer by reducing vitamins and including detailed assembly steps as part of the design files. I've made an effort to reduce the number of unique parts (nuts & bolts) as much as possible. I've also incorporated single-piece Y ends that eliminate about 20 more hardware items. The repository has these parts: The STL files needed to build the printer. Documentation section where instructions and parts-list can be found. Some parts have corresponding OpenSCAD models which are kept in the scad folder. Various images of the printer/build process are in the images folder (beneath docs).

edi-cam

Software to run linux webcam. edi-cam demonstrates live video streaming on Intel Edison using Node.js and WebSockets. Audio is not supported at the moment. See the demo in action here. The Node.js server is responsible for: Listening for the incoming video stream via HTTP. ffmpeg, a multimedia framework for converting and streaming audio / video, is used to encode the webcam's video to MPEG1. Broadcasting the video stream via WebSockets to all connected browsers. Serving web/client/index.html, which renders the video stream onto a canvas element. jsmpeg, a JavaScript MPEG1 decoder, is used to decode the video stream. This project was inspired by phoboslab.

Credits

Matthew David Elgert

Matthew David Elgert

1 project • 11 followers
Phoenix 3D Printing Meetup This group is for anyone interested in 3D printing. Both novices and experienced printers are welcome.
Badredine Djedid

Badredine Djedid

1 project • 7 followers
Jennifer Elgert

Jennifer Elgert

1 project • 9 followers
Kimberly Lindvall

Kimberly Lindvall

1 project • 8 followers
I am a teacher librarian, interested in makerspaces. I love the idea of communities pooling resources to create new ideas and inventions.

Comments