Skip to content

Instantly share code, notes, and snippets.

@pinski1
pinski1 / Solenoid_Driver.ino
Last active November 27, 2023 22:14
Code for a ZTW Spider Lite 18A v2 brushless ESC into a solenoid driver
/** ZTW Spider Lite v2 ESC to Solenoid Driver
ZTW Spider Lite 18A v2 uses the ATMega8A and
none of the MOSFET enable pins are PWM capable.
Pin out:
https://github.com/bitdump/BLHeli/blob/master/Atmel/ZTW_Spider_Lite_18Av2.inc
To Do:
[ ] Monitor VCC via PIN_MUX_V
(print "Fast Electric Lifter & Drive")
(print (get-vin))
(print (sysinfo 'uuid))
(uart-start 115200)
; Globals
(define uart-buf (array-create type-byte 50))
(define chan-buf (list 0 0 0 0 0 0 0 0))
(define error-cnt 0)
(define loop-start 0)

Scouse Showdown 2022 - Tactics

Coming up with some tactics/strategies before the competition.

Many bots available here: https://www.youtube.com/watch?v=gj2Bs70qUio

Opponents

7th Circle

  • 2 wheel drive, thick vertical disk by David Weston

🇬🇧 UK
🇫🇷 France
🇮🇹 Italy
🇦🇹 Austria
🇨🇭 Switzerland
🇩🇪 Germany
🇧🇪 Belgium
🇳🇱 Netherlands
🇳🇴 Norway
🇵🇱 Poland

#!/usr/bin/env python3
"""
something
https://piwars.org/2018-competition
"""
import sys
import time
@pinski1
pinski1 / MemberStorage.md
Created June 8, 2017 21:44
Some musings on member storage.

I'm a member of Cambridge Makespace (where I live) and London Hackspace (where I used to live). Both spaces are fairly mature and have a reasonable number of members for their available space. At a Makespace new member induction each new member is told that they may have a Really Useful 35L box to store items in (less solvents/flammables). This works really well as they are cheap (~£13), robust and store quite a lot of stuff. We have shelving units in our corridors which take ~15 of these boxes so storing the 200 odd boxes doesn't take up too much room.

However we now have enough members that problems with the system are beginning to show. These seem to be: claiming of permanent workstations, excessive personal storage and large item storage. The first two problems largely seem to be solved with tellings off, we've not progressed to formal disciplinary actions yet. We're currently working on using some unused underfloor 'rooms' as large project sto

@pinski1
pinski1 / ButtonTest.py
Created May 16, 2017 19:40
Quick script to test the 4 buttons for my Sinclair Cpi display.
#!/usr/bin/env python
from signal import pause
import gpiozero
# pins = 4, 17, 24, 25
print("Testing buttons")
buttonOne = gpiozero.Button(4)
/** @brief RC Mixer
* @detailed Takes 2 RC signals and mixes them to produce tank style steering. The results are scaled to ensure no stick travel is wasted.
*
* Algorithm copied from here: http://electronics.stackexchange.com/questions/19669/algorithm-for-mixing-2-axis-analog-input-to-control-a-differential-motor-drive
*
* @param inThrottle The throttle channel RC value, constrained to -255 and +255
* @param inYaw The steering channel RC value, constrained to -255 and +255
* @param outLeft The left motor output, constrained to -255 and +255
* @param outRight The right motor output, constrained to -255 and +255
*/
@pinski1
pinski1 / Wheel_Tester.ino
Last active June 5, 2016 13:53
Counts encoder ticks in order to enable motor characterisation.
/** Sketch to characterise motors.
*
* Needs the following libaries:
* https://github.com/PaulStoffregen/Encoder
* https://github.com/pololu/dual-vnh5019-motor-shield
* https://github.com/PaulStoffregen/MsTimer2
*/
#define ENCODER_OPTIMIZE_INTERRUPTS
#include <Encoder.h>
#include <DualVNH5019MotorShield.h>
@pinski1
pinski1 / BatteryTester.ino
Last active March 21, 2019 16:54
eBike Battery Capacity Tester with LTC4151 & LCD Shield
/** Battery Characteriser
Arduino ???
LTC4151 power monitor
Load, 2x paralleled 10Ω 200Watt power resistors
DS18B20, 4x temperature sensors
Fans, 2x 120mm PWM-controlled PC FANs
SD Card, for logged data
LCD Display and keypad http://www.hobbytronics.co.uk/arduino-lcd-keypad-shield?keyword=LCD%20Shield