Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by abuet

  1. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I tried that, and It helped me understand some of my problems. I tried making new code here to for file.read(), since the main reason I abandoned that was because the command wouldn't compile nor function if it did. Still however, this code below functions the same as before :/ #include...
  2. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    When I am testing the code, I monitor the output int he serial monitor of Arduino IDE, if that is what you mean. So far, I have gotten all electrode values I am looking for (x,y), in a loop. The part that baffles me is the fact that the solenoid valves don't activate despite being error less in...
  3. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I tried coding it like this: if (file.read((char*)'A',1)){ And ended up reducing errors to only this: In function 'void loop()': test5:326:8: error: 'file' was not declared in this scope if (file.read((char*)'A',1)){ In function 'void loop()': test5:326:8: error: 'file' was not...
  4. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I keep getting errors like this: test4:83:11: error: request for member 'read' in 'file', which is of non-class type 'int' if (file.read() = myChar2);{ ^~~~ test4:96:7: error: expected primary-expression before 'else' if (else digitalWrite(1, LOW)); ^~~~ test4:96:7: error...
  5. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I'm really struggling with this, I just cant figure out whats wrong. My code using if (Serial.readBytes((char*)'A',1)){ was the only one that had been moderately successful, in working the rest of the code other than the solenoids. The goal is to make the solenoid valve code only execute on...
  6. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I have been trying this but it always gives the errors: In function 'void loop()': error: 'file' was not declared in this scope if (file.read()) == myChar1));{ ^~~~ note: suggested alternative: 'fileno' if (file.read()) == myChar1));{ ^~~~ fileno error...
  7. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    I have tried using this statment: if (Serial.readBytes((char*)'U',1)){ and with some other changes, the code compiles. However, the solenoid valves dont activate when tested, although the rest of the code works perfectly. Here it is: #include <Arduino.h> #include <stdint.h> #include <SD.h>...
  8. A

    C++ Arduino solenoid valves not working

    Hi so I have been working on a project with several solenoid valves, an arduino uno, two L3 motor shields, and an SD card reader. My code has compiled and is partially working, but the solenoid valves don't turn on when the SD card is being read. It is supposed to read the text file in the SD...
  9. A

    C++ how to get an Arduino program to identify different letters for If..else statements?

    Hi I am very new to Arduino and I am having trouble with some if statements I made. I keep getting the error "request for member 'read' in 'file', which is of non-class type 'int'", for each of my if statements. The goal was to make the if statements run when a character in the added text file...
  10. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    Thank you so much for your help! I am very grateful to you for giving insight, despite my ignorance.
  11. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    1. The function open_me() is programmed like that because I wanted the program to run on the insertion of the SD card, which holds the oligo.txt file. 2. A, G, C, T, and U are all supposed to be the letters read from the oligo.txt file. I wanted the statement to only run when it reads the given...
  12. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    I have been trying to modify the code so each if statement starts with a dependency for each letter (A,G,T,C,U) read from text file with the statement " if (File::read(A)){ ". The "final statement" I was referring to was the use of " if (File::read('\0')){ " to allow the if statement for...
  13. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    Sorry I forgot to add this on. I have also been trying to add a final if statement for when the program reaches the end of the text file. I'm not sure where to start here exactly. Sorry to bother you again.
  14. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    I have been trying to make that work, but the Arduino IDE ends up not recognizing a lot of the variables. The last suggestion you gave me helped a lot, and allowed the code to compile. I have also been trying to take an SD card file, and assemble each individual character into an array. I have...
  15. A

    Arduino solenoid valve code. Particular issues with declaration and if statments.

    thank you so much! I really appreciate your help especially since I'm so new at this.
Back
Top Bottom