This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************ | |
* ble_handler.cpp | |
* shabaz - oct 2023 | |
* this file encapsulates the BLE related functions used in the project | |
************************************************************************/ | |
// includes | |
#include "ble_handler.h" | |
#include "config_gatt.h" | |
#include "btstack.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********* animation test ************* | |
* tested with an Arduino Mega | |
**************************************/ | |
#include <Servo.h> | |
#include <animationTools.h> | |
// ********** definitions ************************ | |
// total number of servos | |
#define SERVO_TOTAL 6 | |
// enumerate the servos from 0 to SERVO_TOTAL-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************** | |
* Button Power Control | |
* | |
* rev 1 - shabaz - December 2023 | |
* This code expects a push-button wired to GPIO pin P1.2 and VCC. | |
* The output is on pin P2.3 | |
* The delays for turn-on and turn-off are separately configurable | |
* (see the definitions below) | |
* *********************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Details: An error occurred while executing command: 'host-status --ide-path=/root/.cache/JetBrains/RemoteDev/dist/5e0b8d8cdf7c1_CLion-2023.3.1 --project-path=/IdeaProjects/project1' Exit code: 1 | |
2024-01-12 01:35:33,005 INFO sh -c "uname -sm" | |
stdout: | |
Linux x86_64 | |
2024-01-12 01:35:33,276 INFO sh -c "echo $SHELL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.17.0 | |
# Install toolchain | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add git \ | |
python3 \ | |
py3-pip \ | |
cmake \ | |
build-base \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FindLibUSB.cmake - Try to find the Hiredis library | |
# Once done this will define | |
# | |
# LIBUSB_FOUND - System has libusb | |
# LIBUSB_INCLUDE_DIR - The libusb include directory | |
# LIBUSB_LIBRARIES - The libraries needed to use libusb | |
# LIBUSB_DEFINITIONS - Compiler switches required for using libusb | |
find_path(LIBUSB_INCLUDE_DIR | |
NAMES libusb.h | |
PATHS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# de_embed.py - VNA Measurement De-Embedding | |
# rev 1 - shabaz - January 2024 | |
# This code reads three .s1p files, (for S11 Open, Short, and for the DUT). | |
# Then, the DUT is de-embedded using the Open and Short files. | |
# The corrected DUT is saved to a new file, and is also displayed on a Smith chart. | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import skrf as rf | |
from scipy.optimize import minimize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# elec_comp.py - Electrical length compensation | |
# rev 1 - shabaz - January 2024 | |
# based on code by Keisuke Kawahara | |
# This code reads two .s1p files, (for S11 Open and DUT). | |
# Then, the electrical length is calculated from the Open file, | |
# and applied to the DUT file. The corrected DUT file is saved to a new file, | |
# and is also displayed on a Smith chart. | |
import skrf as rf | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plot_ind.py - Reads a .s1p file and plots the inductance vs frequency on a graph | |
# uses DraggableMarker class from https://stackoverflow.com/questions/43982250/draggable-markers-in-matplotlib | |
# rev 1 - shabaz - January 2024 | |
import skrf as rf | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys | |
# set the filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sny_ir_receiver.py - A Pi Pico MicroPython based SNY IR receiver | |
# rev 1 - shabaz - October 2023 | |
# modified for controlling up/down outputs - shabaz - May 2024 | |
import time | |
from machine import Pin | |
from rp2 import asm_pio, PIO, StateMachine | |
# IR sensor pin | |
ir_pin = Pin(15, Pin.IN, Pin.PULL_UP) |
OlderNewer