Skip to content

Instantly share code, notes, and snippets.

View byq77's full-sized avatar

Szymon Szantula byq77

View GitHub Profile
@byq77
byq77 / Configuration.h
Last active August 21, 2022 02:20
Marlin 2.1.1 configuration Ender 3 Pro v1.1.5
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program 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
@byq77
byq77 / ros1_core2_mbed6_test.cpp
Last active June 1, 2022 15:08
ros1 core2 mbed6 test - rpi4 connection tests
#include <mbed.h>
#include <ros.h>
#include <std_msgs/Float32.h>
#include <std_srvs/SetBool.h>
#define TEMP_SENSOR_AVG_SLOPE_MV_PER_CELSIUS 2.5f
#define TEMP_SENSOR_VOLTAGE_MV_AT_25 760.0f
#define ADC_REFERENCE_VOLTAGE 3.3f
#define ADC_MAX_VALUE 4095.0f
#define TEMP110 110.0f
@byq77
byq77 / RosMockSensorTest.h
Last active August 25, 2021 08:48
Mbed ros mock sensor test
#pragma once
#include <mbed.h>
#include <ros.h>
#include <std_msgs/Float32.h>
#define SPIN_DELAY_MS 10U
#define SENSOR_INTER_MEASUREMENT_MS 1000U
#define MOCK_PIN ADC_TEMP
@byq77
byq77 / tlp_test.log
Created August 15, 2021 17:39
TLP 1.4 beta conservation mode test Lenovo Legion 5
# step 1
# tlp start
# tlp-stat -s -c -b
--- TLP 1.4.0-beta.1 --------------------------------------------
+++ Configured Settings:
defaults.conf L0004: TLP_ENABLE="1"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
@byq77
byq77 / fw_update.sh
Created November 12, 2019 00:43
ROSbot firmware update
#!/bin/bash
USAGE_STR="Usage: ./fw_update.sh <tag> e.g. ./fw_update.sh 0.9.0"
MACHINE=`uname -m`
if [ ${#} -ne 1 ]; then
echo -e "Wrong number of arguments.\n$USAGE_STR"
exit 1
fi
@byq77
byq77 / ESP32_ledstrip_webserver.ino
Created January 9, 2019 17:02
ESP32_ledstrip_webserver
#include <WiFi.h>
#include <NeoPixelBus.h>
#include <Husarnet.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 12
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 60
@byq77
byq77 / c_cpp_properties.json
Created November 15, 2018 19:34
Example of c_cpp_properties.json for mbed project in vs code using mbed cli tools
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceRoot}\\*",
"${workspaceRoot}\\lib\\*",
"${workspaceRoot}\\lib\\BleController\\*",
"${workspaceRoot}\\lib\\ManualControlService\\*",
"${workspaceRoot}\\mbed-os\\*",
@byq77
byq77 / task.json
Last active November 15, 2018 18:34
Example of task.json for mbed cli project in Visual Studio Code IDE
{
"version": "2.0.0",
"tasks": [
{
"label": "build release clean",
"type": "shell",
"command": "mbed",
"args": ["compile", "--profile", "release", "-c", "-N", "firmware"],
"group": {
"kind": "build",