This file contains hidden or 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
--This script can be used as a library of functions to configure the PWM registers for output and write new duty cycles to the PWM channel. | |
--PWM is available on the T7 on FIO0-FIO5 (T4 PWM is on FIO6 & FIO7) | |
--See the device datasheet for more information on PWM output. | |
-- Details about compatible DIO channels (tables 13.2-1 and -2): https://labjack.com/support/datasheets/t-series/digital-io/extended-features | |
-- PWM specific details: https://labjack.com/support/datasheets/t-series/digital-io/extended-features/pwm-out | |
--Functions to configure T7/T4 | |
outPin = 6--FIO0. Changed if T4 instead of T7 | |
pwmFrequency = 0 -- 50 Hz |
This file contains hidden or 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
--[[ | |
Name: BellowsPumpControl | |
USER Ram U16 address starts at 46180 (USER_RAM0_U16) | |
SPEED will be a slider from 0-2^16 resulting in a speed of 0-400 steps/sec | |
--]] | |
local MAX_SPEED = 800 | |
local set_speed = 0 --this should execute ~1/second |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 ubuntu:20.04 as root_builder | |
#LABEL maintainer.name="ROOT team" | |
#LABEL maintainer.email="[email protected]" | |
# https://github.com/root-project/root-docker/blob/master/ubuntu_from_source/Dockerfile | |
LABEL maintainer.name="bung" | |
LABEL maintainer.email="[email protected]" | |
# ROOT version in the MAJOR.MINOR.REVISION format or a https://github.com/root-project/root branch name / tag. Example: ROOT_VERSION=6.26.00 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
!apt install texlive-fonts-recommended texlive-fonts-extra cm-super dvipng | |
import matplotlib.pyplot as plt | |
plt.rcParams['text.usetex'] = True | |
import numpy as np | |
from scipy.optimize import minimize | |
from google.colab import files | |
from requests import get | |
import pandas as pd | |
from bs4 import BeautifulSoup |
This file contains hidden or 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
#include "WPA_secrets.h" | |
#include <Arduino.h> | |
#include <WiFi.h> | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <time.h> | |
#include <NTPClient.h> | |
#include <WiFiUdp.h> | |
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip | |
#include "Adafruit_MQTT.h" |
This file contains hidden or 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
''' | |
Helpful functions for converting register data to numbers and vice versa. | |
''' | |
import struct | |
def float2int(num): | |
return struct.unpack("=i", struct.pack("=f", num))[0] |
This file contains hidden or 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
/* | |
Figuring out how to convert floats to uint16_t for Modbus and vice-versa | |
Serial Output: | |
Float 3.14 = [16456 , 62915] | |
[ 5243 , 16830 ] = 23.76 | |
*/ | |
#include <Arduino.h> | |
float f = 3.14; |
NewerOlder