This file contains 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
// @author Michael Hoffer <[email protected]> | |
// Requires TMCStepper library | |
#include <TMCStepper.h> | |
#include <EEPROM.h> | |
#include <avr/wdt.h> | |
#include <Wire.h> | |
#define CS_PIN1 8 // CS1 chip select | |
#define CS_PIN2 9 // CS1 chip select | |
#define CS_PIN3 10 // CS2 chip select |
This file contains 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
using System.Runtime.InteropServices; | |
using System.Security; | |
namespace com.bfx.timerutil { | |
/// <summary> Tools to enable high-resolution timer (1ms). Default timer resolution is 16ms.</summary> | |
/// Note, that only the resolution of Thread.Sleep() is increased. Task.Delay() is not affected by this | |
/// increased resolution since the responsible timer is running at fixed 16m rate. | |
public static class TimerUtil { |
This file contains 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
/** | |
* Example on how to compute Arduino compliant CRC16 checksums in Java. | |
* | |
* @author [email protected] | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
byte[] data = new byte[]{1,2,3}; | |
int crc = crc16(data); |
This file contains 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
/* DHT library v0.0.2 works for Particle Electon v1.0.1 | |
* | |
* MIT license | |
* written by Adafruit Industries | |
* modified for Spark Core by RussGrue | |
* */ | |
#include "Adafruit_DHT_Particle.h" | |
DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) { |
This file contains 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
package eu.mihosoft.vrl.user; | |
import eu.mihosoft.jcsg.ext.mesh.MeshTools; | |
import eu.mihosoft.jcsg.CSG; | |
@ComponentInfo(name="MeshOptimizer", category="Custom") | |
public class MeshOptimizer implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
public CSG optimize( | |
@ParamInfo(name="mesh to optimize", style="default", options="") CSG mesh, |
This file contains 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
package eu.mihosoft.vrl.user; | |
import eu.mihosoft.jcsg.Cylinder; | |
import eu.mihosoft.jcsg.CSG; | |
import eu.mihosoft.vvecmath.Transform; | |
import eu.mihosoft.vvecmath.Vector3d as Vec3d; | |
import eu.mihosoft.vvecmath.Vectors3d as Vecs; | |
import eu.mihosoft.jcsg.ext.path.* | |
@ComponentInfo(name="Bacteria Creator 01", category="Custom") | |
public class BacteriaCreator01 implements java.io.Serializable { |
This file contains 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
package eu.mihosoft.vrl.user; | |
/** | |
* Function Plotter | |
*/ | |
@ComponentInfo(name="FunctionPlotter", category="ODE") | |
public class FunctionPlotter implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
public Trajectory run( |
This file contains 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
package eu.mihosoft.vrl.user; | |
import eu.mihosoft.jcsg.*; | |
import eu.mihosoft.jcsg.ext.mesh.MeshTools; | |
@ComponentInfo(name="MeshOptimizer", category="Custom") | |
public class MeshOptimizer implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
public CSG optimize( | |
CSG csg, |
This file contains 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
/* | |
Truncated octahedron. | |
*/ | |
module truncocta() { | |
// octahedron based on code by Willliam A Adams | |
octapoints = [ | |
[+1, 0, 0], // + x axis | |
[-1, 0, 0], // - x axis | |
[0, +1, 0], // + y axis |
This file contains 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
grammar org.xtext.example.mydsl.take1.MyDsl with org.eclipse.xtext.common.Terminals | |
generate myDsl "http://www.xtext.org/example/mydsl/take1/MyDsl" | |
Json: value=Val; | |
Obj: | |
'{' | |
pairs+=Pair (',' pairs+=Pair)* |
NewerOlder