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
#!/usr/bin/python3 | |
"""Control an Arduino over the USB port.""" | |
# Based on: | |
# usb.py | |
# Created by John Woolsey on 12/17/2019. | |
# Copyright (c) 2019 Woolsey Workshop. All rights reserved. | |
# Reference: | |
# https://www.woolseyworkshop.com/2020/02/05/controlling-an-arduino-from-a-raspberry-pi/ |
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
#include <TimerOne.h> | |
// PWM Pins | |
#define PIN_FAN1_OUTPUT_PWM 9 // PWM Signal to fan 1 - OUTPUT FAN | |
#define PIN_FAN2_OUTPUT_PWM 10 // PWM Signal to fan 2 - INPUT FAN | |
#define PWM_MAX_VALUE 1023 // maximum value of analog pwm throttle signal | |
// Set these to the defaults that you want on startup (0-255) | |
int pwm_value_fan1 = 220; | |
int pwm_value_fan2 = 0; |