NPP retrofit
https://1drv.ms/b/s!AoVwbfZXGuTDhcdN...aeefw?e=FG6Ql0
https://1drv.ms/b/s!AoVwbfZXGuTDhcdO...Aqk3A?e=XzifVr
Also, I edited the code through a bunch of educated guess at what should be cut and added. Still not a code junky but I think this code does what I need it to. Any suggestions on the code or does it look right based on not using any memory and more analog switching?
#include <PWM.h> // pwm-frequency-library
const int _pwmPin = 9; //pin9 on arduino board
const int _buttonPin = 8; // pin8 on board
bool _isRunning = true;
bool ReadValveState()
{
{
}
{
}
}
void DoOpenValves()//sends a pwm signal to valves causing them to open
{
pwmWrite(_pwmPin, 203);
}
void DoCloseValves()//sends a pwm signal to valves causing them to close
{
pwmWrite(_pwmPin, 51);
}
void setup() {
InitTimersSafe();
SetPinFrequencySafe(_pwmPin, 200); //sets the pwm pin frequency to 200 Hz
pinMode(_pwmPin, OUTPUT); // sets the pwm pin as an output pin
pinMode(_buttonPin, INPUT_PULLUP); //sets the input pin for the button
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() //the main body of our arduino code, this is run over and over as long as there is power
{
if (digitalRead(_buttonPin) == HIGH) //check the state of the button if it's pressed
{
DoOpenValves();
}
else // Any state other than High
{
DoCloseValves();
}
}
I appreciate your help.
-Stroke
It requires the modifications that I have made to the circuitry and code to work properly since I’ve done away with the momentary switch.
This is just all so new to me, but my code tested out to work properly. Just not sure if it’s problematic in some way for the Arduino. Also, I’m going to print some PCB’s since I’m saving so much money on the controller and I want to make sure the PCB design came out right.
-Stroke
Last edited by Strokemyaxe; Jun 11, 2021 at 06:44 PM.
Its enough to run a wire harness to do this on a car like C7 that did not have this stock from the factory.
4 valve system may use other inputs but that is cutting back an already restricted 2-3/4 exhaust system before it enters the mufflers, why you'd want to cut those back never made sense
The Best of Corvette for Corvette Enthusiasts


Elmer
bool readvalvestate
{
}
And there's nothing between the { } you can delete the entire entire thing. It's a "method" that does nothing and only confuses your code. Aside from some things like that I think what you have will work.
Keen in mind the c7 muffler butterflies have springs in them so that they are normally open and your own signal actually closes them when it's at 80% duty cycle which might just be bad naming on my part, but you get the point. 80% duty cycle is 203 and 20% is 51 when you are calling pwmWrite, so once you have your system put together you might find it necessary to switch the 203 with the 51 depending on whether your vacuum actuated switch is normally open or normally closed. You'll know if that's your issue because it will work opposite of what you want
Last edited by Strokemyaxe; Oct 9, 2023 at 01:57 PM.












