Skip to content

Instantly share code, notes, and snippets.

@kopp
kopp / catkin_build_python_package.md
Created October 17, 2016 19:21
Why you should catkin build a pure python package as well.

Why you should catkin build a pure python package as well, although nothing gets compiled:

When you build a package using catkin build, the path to the package is added to some variables in setup.bash. When setup.bash is sourced the next time, these variables are made part of the environment. Thus, tools like rosrun and roslaunch can find the executables/scripts and python may find modules.

@kopp
kopp / .txt
Created September 4, 2017 20:38
Error when generating trpl2 278f4db54 using crowbook
Debug: (Bignoring HTML block '<!-- ignore -->'
Debug: (Bignoring HTML block '<!-- ignore -->'
Debug: (Bignoring HTML block '<span class="filename">'
Debug: (Bignoring HTML block '</span>'
Debug: (Bignoring HTML block '<span class="filename">'
Debug: (Bignoring HTML block '</span>'
Debug: (Bignoring HTML block '<!-- ignore -->'
Debug: (Bignoring HTML block '<span class="filename">'
Debug: (Bignoring HTML block '</span>'
Debug: (Bignoring HTML block '<span class="filename">'
@kopp
kopp / SmartphoneAnwendungenPhysikunterricht.md
Created September 6, 2019 08:53
Smartphone Anwendungen fuer Physikunterricht

Smartphone Anwendungen für den Physikunterricht

Mechanik, Klasse 10

  • Kamera: Damit füttern wir Tracker: PC Tool (cross Plattform) für manuelle oder automatische Videoanalyse; erstellt s(t), v(t) usw. Diagramme.
  • phyphox: iOS/Android App für Beschleunigung und Drehung
  • Vision Motion: Android App, die farbige Objekte tracken kann und dann s(t), v(t), a(t) anzeigt.
@kopp
kopp / HowToUseChromeForWebDevelopment.md
Last active November 5, 2019 13:19
How to use Chrome for Web Development
  1. cd to the sources of the website.
  2. Run a local webserver, e.g. python -m http.server
  3. Launch chrome and open the local webserver, e.g. localhost:8000
  4. Follow the steps described in this animation Animation how to use chrome for web development or in the official documentation.
#include <Arduino.h>
#include <IRremote.h>
// IR Receiver anschliessen:
// links (neben -): GND
// Mitte: 5V
// rechts (neben S): Signal (bspw an Pin 2)
const int irReceiverPin = 2;
IRrecv irrecv(irReceiverPin);
@kopp
kopp / jupyter_lab_00_pip_install.bat
Last active April 25, 2023 19:34
BAT script to install and run Jupyter Lab in a virtualenv
python -m venv virtualenv
CALL virtualenv\Scripts\activate.bat
pip install jupyterlab
PAUSE
@kopp
kopp / Readme_GetStartedWithCalliopeMiniOnWindows.md
Last active February 6, 2020 15:41
Get Started With Calliope Mini on Windows

TigerJython

  • Download https://www.tjgroup.ch/download/TigerJython.msi
  • install the msi file without admin privileges using install.bat -- modify the target directory in that file
  • Execute <target>/bin/TigerJython.exe
  • Flash CalliopeMini with MicroPython -- this needs to be done only once so that MicroPython is installed on the Calliope
    • Plug in Calliope
    • Tools -> Devices -> micro:bit/Calliope
  • Tools -> Flash Target
@kopp
kopp / calliope_mini_robot_two_ac_motors.py
Created June 21, 2020 21:22
A python class that allows to control a two-wheel robot with two AC motors on the Calliope Mini.
from calliope_mini import pin28, pin29, pin30
from utime import ticks_us, ticks_add
# Note: as the file is large and has long comments, use pyminifier before uploading to Calliope mini.
# Note: Some abstration is missing here and code is duplicated.
# This happens with a reason:
# MicroPython has only a very limited stack size and thus number of nested
# function calls is low.
# Because of that, code is repeated in different functions
@kopp
kopp / aurci_restructuring.md
Created July 11, 2020 19:18
Notes about restructuring aurci to aurci2
@kopp
kopp / dash_map_plot_with_interaction.py
Created February 11, 2021 22:11
Dash App with plotted map and some user interaction
# %%
# Application that displays data on a map and allows to modify the data in a
# callback triggered by a button.
#
# Note: This application must not be executed using multiple workers, but only
# single-threaded (i.e. run with `python <name>`).
# See https://dash.plotly.com/sharing-data-between-callbacks for the reason.
import dash