Image Segmentation
Fast Print
English
art
3D
3D-Printing
Manufacturing
Firmware
Cuda
Cude-Acceleration
GPU
Instructions to use OpenPeerAI/FastPrint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Fast Print
How to use OpenPeerAI/FastPrint with Fast Print:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 850 Bytes
b6a0fc3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | using System.IO.Ports;
using System.Threading.Tasks;
namespace FastPrint.Printer
{
public class MarlinConnector
{
private SerialPort port;
public MarlinConnector(string portName, int baudRate = 115200)
{
port = new SerialPort(portName, baudRate);
}
public async Task ConnectAsync()
{
if (!port.IsOpen)
port.Open();
await SendCommandAsync("M115"); // Get firmware info
}
public async Task SendCommandAsync(string gcode)
{
if (port.IsOpen)
await port.BaseStream.WriteAsync(System.Text.Encoding.ASCII.GetBytes(gcode + "\n"));
}
public void Disconnect()
{
if (port.IsOpen)
port.Close();
}
}
} |