Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

TheUnderratedGamer

Member
  • Content Count

    57
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About TheUnderratedGamer

  • Title
    Member

Recent Profile Visitors

374 profile views
  1. Hey, so i'm currently working with an arduino leonardo with a 321Maker college kit and I've just got done making a song using the buzzer; however, i'm having a problem doing a little light show i want to do. I'd like to assign an rgb value to each Note that i used (D4, A4, GS4. etc) but i'm having a little trouble figuring out exactly which value i actually need to use. also, should I use and if or a while statement? I'm still not super confident in this stuff and i would appreciate the help (also i cut out the bulk of the song for here just to make it look a bit better. #include "pitches.h"; int buzzerPin = 5 ; //The buzzerPin is connected to pin 5 of the Arduino. int button1Pin = 2; //The SW1 button is connect to pin 2 of the Arduino. int RGBRedPin = 9; //The red RGB LED is connected pin 9 of the Arduino. int RGBGreenPin = 10; //The green RGB LED is connected pin 10 of the Arduino. int RGBBluePin = 11; //The blue RGB LED is connected pin 11 of the Arduino. void setup() { //The Setup function runs once. pinMode(buzzerPin, OUTPUT); //Setup red LED pin as an output pin. pinMode(button1Pin, INPUT); //Setup button1 pin as an input pin. pinMode(RGBRedPin, OUTPUT); //Setup red RGB LED pin as an output pin. pinMode(RGBGreenPin, OUTPUT); //Setup green RGB LED pin as an output pin. pinMode(RGBBluePin, OUTPUT); //Setup blue RGB LED pin as an output pin. Serial.begin(9600); } void loop() { //The loop function runs forever. if (digitalRead(button1Pin) == LOW) { //Check to see if button1 is pressed. //Opening repeating thing tone(buzzerPin, NOTE_D4,500); delay(204); tone(buzzerPin, NOTE_D4,500); delay(204); tone(buzzerPin, NOTE_D5,500); delay(204); tone(buzzerPin, NOTE_A4,500); delay(204); } }
  2. TheUnderratedGamer

    Adding User input to bank balance

    Thanks so much, I think i get it now. I wasn't too far off. sorry about the late reply, i decided to sleep on it
  3. TheUnderratedGamer

    Adding User input to bank balance

    Sorry, I'm very new to this. How would i do that?
  4. TheUnderratedGamer

    Adding User input to bank balance

    I was trying some things and i guess I forgot to uncomment it when I copied and pasted.
  5. TheUnderratedGamer

    Adding User input to bank balance

    Hey guys, I'm practicing some java stuff and I've made a blueprint along with my account class and i've managed to make my own methods for printing and adding to the balance, but I'm trying to add to the balance using user input with the Scanner utility. All i'm able to print out after inputting a double value is the original unchanged balance. any help would be appreciated. //theres my account class blueprint import java.util.Scanner; public class ChequingAccount { private String first; private String last; public double balance; public ChequingAccount(String first, String last, double balance) { this.first = first; this.last = last; this.balance = balance; } public void addToBalance(double userNumber) { this.balance=balance+userNumber; } public void getBalance() { System.out.println(balance); } // public void userInput(double usernumber) //{ // this.balance=balance+usernumber; //} } //and theres my Instance I'm trying to add to with the user input import java.util.Scanner; public class TestChequingAccount { public static void main(String[]args) { ChequingAccount makaylasAccount=new ChequingAccount("Makayla", "Musgrove", 320.50); System.out.print("Your Balance is "); makaylasAccount.getBalance(); Scanner reader = new Scanner(System.in); System.out.println("Enter your deposit ammount"); double userNumber = reader.nextDouble(); //makaylasAccount.addToBalance(); makaylasAccount.getBalance(); } }
  6. TheUnderratedGamer

    Help with a basic Java thing?

    Never mind, fixed it
  7. TheUnderratedGamer

    Help with a basic Java thing?

    Thanks my dude, Now i'm dealing with this C:\COMP1030\In-Class-Assignment-1>java HelloWorld Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 I've been trying to find a newer version of the Java Runtime Environment but That doesn't seem to work. I also really appreciate the help. I'm sure these early stages are going to be the worst part for me
  8. TheUnderratedGamer

    Help with a basic Java thing?

    well. thanks guys, thread is over rip my life. im gonna go cry in a corner now
  9. TheUnderratedGamer

    Help with a basic Java thing?

    MOTHER FUCKER. im very tired
  10. TheUnderratedGamer

    Help with a basic Java thing?

    Hey guys, I've just started school and i'm taking an introductory java class. my prof is having us run a java compiler through the command prompt on a .java file that he's given us the base code for (on paper so i think i could be just missing something there). And i cant seem to figure out what i'm doing wrong. here's the code in the .java file public class HelloWorld { public static void main (String [] args) { System.out.printin ("Hello, World"); } } vs the code on the sheet and here's the error im getting in command prompt C:\COMP1030>javac In-Class-Assignment-1 error: invalid flag: In-Class-Assignment-1 Usage: javac <options> <source files> use --help for a list of possible options C:\COMP1030>cd In-Class-Assignment-1 C:\COMP1030\In-Class-Assignment-1>javac HelloWorld.java HelloWorld.java:5: error: cannot find symbol System.out.printin ("Hello, World"); ^ symbol: method printin(String) location: variable out of type PrintStream 1 error
  11. I got my hands on a MacBook with a busted (and now removed) screen (and a wiped ssd) and I'm trying to boot into recovery mode to reinstall OSX but when I try to sign into my wifi network I input the password and the box just shakes like I input the wrong password.
  12. TheUnderratedGamer

    Cpu temps?

    I use Speedfan, MSI Afterburner, and cpu-z
  13. TheUnderratedGamer

    Pokemon ShinyGold / Fake games?

    Some of them are alot of fun, I would do some research and see if it's worth your time. maybe try it on an emulator before purchasing
  14. TheUnderratedGamer

    My PC was killed by a busted water pipe

    The progress so far. Pray for the 980ti
  15. TheUnderratedGamer

    My PC was killed by a busted water pipe

    So, there is now new information to the story. It turns out that my sisters new dog decided to piss down an AC vent which made its way to my computer. I am absolutely fucking livid
×