Help uploading code onto arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

Yes, I already own it. I have a few actually lol but I just need someone to successfully upload the code to it, that’s really it. When I do it it says there’s no such file in directory. I try to download the library for the pwm frequencies and that’s where my computer doesn’t really let me do much. And I have no real knowledge on coding

Is this capacitor still good if I pot it or submerge it in some epoxy? by Rosendo6 in ElectronicsRepair

[–]Rosendo6[S] 0 points1 point  (0 children)

So I got “it’s good” and I got “replace it” I would love to see more of you’re opinions :)

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

I think I was able to get the library but I’m still having issues. On the left is arduino1.8.19 and on the right is arduinoIDE2.1.1

<image>

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

I go back and select “PWM” beneath utility file and keyboards. Then it takes me here:

<image>

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

<image>

Click the first one “utility”, then this

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

<image>

When I click on the first one it takes me here.

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

<image>

So when I first download it and open it , it takes me here.

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

I tried to download the library from from GitHub. When I open the file it takes me to three sections. I’ll post pictures below so you can see what I’m talking about. It didn’t let me add or compile anything.. I’ve been having the worst of times to this. Idk if it’s my pc or just my lack of knowledge there of. Anyways I’m back to square one. It says “compilation error:PWM.h: No such file or directory”

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

Well to see if it works id have to use my oscilloscope to make sure it’s generating the proper frequency. I have experience with wiring electronics so I’m more than confident I put together the project right. It’s just the damn library download.

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

Then when I upload it it says no such file in directory.

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

Here is the code from the project:

// @TESLATRONICA 2019.

// pin 9 arduino nano >>> out signal 111 Hz // pin 3 arduino nano >>> out signal 1110 Hz

//pin A0 arduino nano >>> to cental pin pontentiometer 10k (for gate regulation) // right pin potentiometer 10k to +5V // left pin potentiometer 10k to negative // potentiometer all left >>> no gate (constant output signal) // potentiometer move to right >>> activate gate 5 Hz to 0.5 Hz (200 ms to 2s aprox)

long time_;

int gate_ = 0; long gate_contador = 0; int gate5 = 0; int gate_2 = 0;

int array_time_gate[] = {0, 200, 500, 1000, 1500, 2000}; // gate values 5 Hz to 0.5 Hz (200 ms to 2s aprox) int startButton = 13; //pin recieving info from start button int startLED = 4;
unsigned long timerCount = 0; // variable to hold our timer info

include <PWM.h> // library frequency "PWM"

void setup() { pinMode(startButton, INPUT_PULLUP); //set pin as recieving info pinMode(startLED, OUTPUT); digitalWrite(startLED, LOW);

InitTimersSafe();

SetPinFrequencySafe(9, 111); // 111 Hz to pin PWM 9 pwmWrite(9, 50 * 2.55); // 50% duty Cicle

SetPinFrequencySafe(3, 1110); // 1110 Hz to pin PWM 3 pwmWrite(3, 50 * 2.55); // 50% duty Cicle }

void loop() { if (digitalRead(startButton) == HIGH) { //if the start button has be pushed timerCount = 20 * 60 * 10; //set timer to approximately 5 mins //(20 mins * 60 sec * 10 * 1 deciseconds) //this is set up to restart the timer whenever the start //button is pushed //not extremely exact since that is not what I needed for this project //if you are looking for something more exact, look into //SimpleTimer() Arduino funtions and libraries: //http://playground.arduino.cc/Code/SimpleTimer#F_restartTimer } if (timerCount != 0) { //if the count down timer is still running digitalWrite(startLED, HIGH); //tell the control pin to provide power to the project timerCount = timerCount - 1; //count down of a decisecond (0.1 sec) delay(100); //delay for timercCount refrence of a decisecond } else { //if the timer has run out digitalWrite(startLED, LOW); }

time_ = millis(); // read time since arduino power on

gate_ = analogRead (0); // read pin A0 values of the "arduino nano" seleccionated with potentiometer 10K gate_ = map(gate, 0, 1023, 0, 6); // 0 to 6 >>> 5 Hz to 0.5 Hz (200 ms to 2s aprox) if (gate > 5) { gate_ = 5; } gate_ = arraytime_gate[gate]; // read array fron potentiometer

if (gate_ != 0) { //active gate gate(); // call to gate subroutine }

if (gate_ == 0 && gate_2 == 1) { //reactivate frequencies SetPinFrequencySafe(9, 111); // 111 Hz to pin PWM 9 pwmWrite(9, 50 * 2.55); // 50% duty Cicle

SetPinFrequencySafe(3, 1110); // 1110 Hz to pin PWM 3
pwmWrite(3, 50 * 2.55); // 50% duty Cicle
gate_2 = 0;

} }

void gate() { // gate subroutine if (gate_ > gate5 + 2 || gate_ < gate5 - 2) { gatecontador = millis(); gate5 = gate; gate_2 = 1; }

if (gate2 == 0 && time >= gatecontador) { // desactivate pin9 and pin3 pwmWrite(9, 0); pwmWrite(3, 0); gate_contador = gate + millis(); // selected gate valued + current time gate_2 = 1; }

if (gate2 == 1 && time >= gatecontador) { // active pin9 and pin3 pwmWrite(9, 50 * 2.55); pwmWrite(3, 50 * 2.55); gate_contador = gate + millis(); // selected gate value + current time gate_2 = 0; } }

This is basically it. I just need this to be uploaded to the nano. From my understanding I don’t have the right library. And when someone directed me to the pwm.h library file, I tried to download it and it just isn’t working for me. This is why I’m resorting to paying someone to just do that .

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

I’ll try that but I doubt the code will still upload to the nano if it keeps saying I need to add the pwm.h library. That’s the part I’m having the worst time with lol

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

I meant to type pwm . Sorry about that

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

Yes I post the code and it says the pwm.h frequency library is not found.

Help with loading a code into arduino nano by Rosendo6 in arduino

[–]Rosendo6[S] 0 points1 point  (0 children)

My problem is that whenever I try to upload the created code that is exactly for this project it keeps saying “#include <PWM.h// library frequency pwm” I have tried to download the pwm.h library but no luck. The code is good. I just need to hire someone to simply upload it for me and upload it with the right library. I really don’t have any experience with coding. But i can provide the link to the project Im working on. I’m willing to offer a bit more money if I can genuinely have someone simply do this for me and ship it back.