Skip to content

Instantly share code, notes, and snippets.

View enomado's full-sized avatar

Stanislav enomado

View GitHub Profile
@agalakhov
agalakhov / s-curve.md
Last active August 15, 2024 02:33
On S-Curve aceleration of stepper and servo motors

On S-Curve aceleration of stepper and servo motors

Alexey Galakhov, 2024

Abstract

We present an algorithm for interpolation S-curve jerk limited acceleration. Our algorithm can be implemeted as integer-only using ARM Cortex M4 vector instructions with only a few instructions per step, thus theoretically capable of generating 100s kHz of steps for multiple axes on a regular Cortex M4. The steps generated are always accurate, there is no error accumulation over time.

Introduction

Most of stepper motor controller designs for 3d Printers and small CNC milling machines use STEP-DIR-based driving with steps generated in software. While cruise moves require just uniform step generation, acceleration and decceleration are much more complex due to their speed profiles.

The state-of-art acceleration (and decceleration) nowadays consider maximal velocity, acceleration and jerk (the first derivative of acceleration over time) in order to make movements as smooth as possible. Jerk-limited control is known to

@suhr
suhr / proofs.md
Last active December 8, 2022 13:05

Упражнения по формальным доказательствам

Нет времени объяснять, переходим сразу к делу.

Инструменты

Доказывать теоремы мы будем, используя интерактивные пруверы Isabelle или Lean 3. Примеры приводятся для каждого прувера, для решения задач же можно использовать любой из них.

@YBogomolov
YBogomolov / session.ts
Last active November 26, 2022 16:45
Session types for TypeScript
// Inspired by https://github.com/Munksgaard/session-types
interface Chan<Env, Protocol> {
env_and_protocol: [Env, Protocol];
}
class Eps implements HasDual {
readonly tag: 'Eps' = 'Eps';
readonly dual!: Eps;
}
@varyen
varyen / vue-noindex.js
Last active March 27, 2019 19:14
Vue component: prevent childs from indexing by crawlers
export default {
name: 'NoIndex',
functional: true,
props: {
tag: {
type: String,
default: 'div',
},
@robballou
robballou / .babelrc
Created January 26, 2018 21:37
Using new babel with shippedProposals
{
"presets": [
[
"@babel/env",
{
"targets": {
"node": "current"
},
"shippedProposals": true
}
@sirsquidness
sirsquidness / proxy.conf
Created September 22, 2016 12:42
How to have nginx proxy_pass follow upstream 302 redirects (eg, when you're running a steam cache and you're behind Cox's layer 7 interception stuff)
# This config came around after a friend had problems with a Steam cache on his
# Cox internet connection. Cox would intercept any requests to Steam content
# servers and return a 302 to Cox's servers. The cache would return the 302
# to the Steam client, and the Steam client would go directly to Cox, bypassing
# the cache.
# This config makes nginx follow the 302 itself, and caches the result of the
# redirect as if it was the response to the original request. So subsequent
# requests to the URL that returned a 302 will get the file instead of a 302.
@smrchy
smrchy / README.md
Last active March 24, 2022 22:50
Sort a SQL query with id and parentid so that the rows have the correct order of the tree.

_queryTreeSort

Note: Please check this blog post for more details on these functions.

Sort a SQL query with id and parentid so that the rows have the correct order of the tree.

Parameters:

  • q (Array): A query result (see example below)
@imankulov
imankulov / watchmedo.sh
Created March 26, 2013 19:37
One-liner. Auto-building Sphinx docs with watchdog. Forked from http://jacobian.org/writing/auto-building-sphinx/
# pip install watchdog
exec watchmedo shell-command --patterns='*.rst;*.py' --ignore-pattern='_build/*' --recursive --command='make html' --wait
@endolith
endolith / Has weird right-to-left characters.txt
Last active October 26, 2024 13:55
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶