Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Herbert jeremyherbert

View GitHub Profile
View gist:43e103bf147c3d5f2edbbf9120cd73ab
PORTB |= (1 << 2); // set pin 2
PORTB &= ~(1 << 2); // clear pin 2
@jeremyherbert
jeremyherbert / main.c
Last active May 6, 2020
Zephyr BLE test
View main.c
#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
#include <bluetooth/bluetooth.h>
#define LED_PORT DT_ALIAS_LED0_GPIOS_CONTROLLER
#define LED DT_ALIAS_LED0_GPIOS_PIN
@jeremyherbert
jeremyherbert / f360_python_debug_runner.py
Created Mar 16, 2020
fusion360 addin to run python scripts from json
View f360_python_debug_runner.py
import adsk.core
import adsk.fusion
import importlib
import inspect
import traceback
import os
import sys
import gettext
import types
import tempfile
View gist:adf841bfdad76d621fea0cdd7e43ce20
USBD: event SUSPEND
USBD: event RESUME
USBD: event SETUP_RECEIVED
Get Status
process_control_request 620: assert failed
Stall EP0
USBD: event BUS_RESET
USBD: event SETUP_RECEIVED
Set Address
USBD: event XFER_COMPLETE
@jeremyherbert
jeremyherbert / main.c
Last active Dec 12, 2019
tinyusb example cdc_msc for STM32F042F6P6 with crystal-less oscillator
View main.c
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@jeremyherbert
jeremyherbert / gist:a57d667b3162f9e2e85d4e3f53675e2b
Created Dec 11, 2019
working conda list for pyside2 windows install
View gist:a57d667b3162f9e2e85d4e3f53675e2b
# packages in environment at C:\Users\jeremy\Anaconda3\envs\testenvqt:
#
# Name Version Build Channel
ca-certificates 2019.11.28 hecc5488_0 conda-forge
certifi 2019.11.28 py37_0 conda-forge
clang 9.0.0 default_hf44288c_4 conda-forge
clang-tools 9.0.0 default_hf44288c_4 conda-forge
clangdev 9.0.0 default_hf44288c_4 conda-forge
clangxx 9.0.0 default_h6bfbf51_4 conda-forge
icu 64.2 he025d50_1 conda-forge
View gist:d6ec7f2624b038289db0f16002428c92
# packages in environment at C:\Users\jeremy\Anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0
alabaster 0.7.12 py37_0
anaconda 2019.10 py37_0
anaconda-client 1.7.2 py37_0
anaconda-navigator 1.9.7 py37_0
anaconda-project 0.8.3 py_0
asn1crypto 1.0.1 py37_0
View config.txt
achi pro sc default setup:
Sensor break power -> 0.0
Cycle time 2 (output 2 - cool) -> 10.0
Cycle time 1 (output 1 - heat) -> 3.0
Deviation alarm setpoint -> 1.00
High alarm setpoint -> 300.
Holdback -> 0.
Heat (output 1) output limit -> 100.0
Setpoint high limit -> 260.
View gist:84c10a4af766c4d6c9a5
$ make
make -k -C examples
make[1]: Entering directory `/home/jeremy/cocotb/examples'
make[2]: Entering directory `/home/jeremy/cocotb/examples/plusargs'
make results.xml
make[3]: Entering directory `/home/jeremy/cocotb/examples/plusargs'
mkdir -p sim_build
iverilog -o sim_build/sim.vvp -D COCOTB_SIM=1 /home/jeremy/cocotb/examples/plusargs/tb_top.v
mkdir -p /home/jeremy/cocotb/build/obj/x86_64
mkdir -p /home/jeremy/cocotb/build/libs/x86_64
View gist:f09e1e4f93a11e3802a3
/home/jeremy/fun/src/unit_test/../Selene/include/selene/Obj.h(67): error: an rvalue reference cannot be bound to an lvalue
detected during:
instantiation of "void sel::Obj<T, Members...>::_register_member(lua_State *, T *, const char *, Ret (T::*)(Args...)) [with T=std::vector<int, std::allocator<int>>, Members=<const char *, void (std::vector<int, std::allocator<int>>::*)(int &&)>, Ret=void, Args=<int &&>]"
(82): here
instantiation of "void sel::Obj<T, Members...>::_register_members(lua_State *, T *, const char *, M, Ms...) [with T=std::vector<int, std::allocator<int>>, Members=<const char *, void (std::vector<int, std::allocator<int>>::*)(int &&)>, M=void (std::vector<int, std::allocator<int>>::*)(int &&), Ms=<>]"
(88): here
instantiation of "sel::Obj<T, Members...>::Obj(lua_State *, T *, Members...) [with T=std::vector<int, std::allocator<int>>, Members=<const char *, void (std::vector<int, std::allocator<int>>::*)(int &&)>]"
/home/jeremy/fun/src/unit_test/../S
You can’t perform that action at this time.