Show Posts
|
|
Pages: [1] 2
|
|
2
|
Using Arduino / Programming Questions / Re: How to log data to a file from arduino
|
on: November 29, 2012, 08:21:01 am
|
|
I need an example sketch of how you can create a file and write to it.I have an arduino UNO at the moment so i cant write to an SD card because i even don't have anything like a shield to interface it with arduino.Therefore an example will be more appeasing as am still a newbie looking for a way of writing data from arduino to a file.
|
|
|
|
|
3
|
Using Arduino / Programming Questions / How to log data to a file from arduino
|
on: November 29, 2012, 02:20:39 am
|
|
I have been trying to use processing to log data to a file,but all i could get is an empty file,the code is here below.Is there a smart way of overcoming it. import processing.serial.*; Serial mySerial; PrintWriter output; void setup() { mySerial = new Serial( this, Serial.list()[0], 9600 ); output = createWriter( "timedg.csv" ); //print(Serial.list()); } void draw() { if (mySerial.available() > 0 ) { String value = mySerial.readString(); if ( value != null ) { output.println( value ); //print(Serial.list()); //Serial.println(value);
} } }
|
|
|
|
|
6
|
Using Arduino / Motors, Mechanics, and Power / Re: Stepper Motors help needed
|
on: March 24, 2012, 03:33:24 am
|
|
How can i control the positions,velocity and acceleration of five stepper motors, apparently i was able to use the accelstepper library to control 2 bipolar stepper motors but i dint have control of the position.i really really need some help figuring it out.. fortunately or unfortunately the entire project deals with driving five stepper motors of the articulating so not being able to control position of any means a dead end
|
|
|
|
|
7
|
Using Arduino / Motors, Mechanics, and Power / Stepper Motors help needed
|
on: March 23, 2012, 09:38:24 am
|
|
I have been designing a circuit to control multiple stepper motors and i succeeded in that,now my main objective is to be able to control them independently in a way that i am able to command the motors to go to any position randomly without having to wait for all that time of uploading the code to the arduino uno.I have been using this code,any suggestions are highly appreciated. #include <AccelStepper.h>
AccelStepper bipolar_stepper_motor; AccelStepper unipolar_stepper_motor(4,6,7,8,9);
void setup() { bipolar_stepper_motor.setMaxSpeed(200.0); bipolar_stepper_motor.setAcceleration(100.0); bipolar_stepper_motor.moveTo(24); unipolar_stepper_motor.setMaxSpeed(300.0); unipolar_stepper_motor.setAcceleration(100.0); unipolar_stepper_motor.moveTo(1000000); }
void loop() { if (bipolar_stepper_motor.distanceToGo() == 0) bipolar_stepper_motor.moveTo(-bipolar_stepper_motor.currentPosition()); bipolar_stepper_motor.run(); unipolar_stepper_motor.run(); }
|
|
|
|
|
8
|
Using Arduino / General Electronics / Urgent help needed with LCD JHD 162A Arduino
|
on: March 21, 2012, 04:52:28 am
|
|
I need some help,i have just bought a JHD162A LCD,and have tried interfacing it with arduino but all in vain,tried every possible thing but cant get it to display anything,I connected it exactly like this and ran the hello world code,but am just getting the backlights lighting,no display,i have tried grounding pin 5 of the LCD,still nothing,please help me get out of this state of quagmire,i have been doing the same circuit since yeaterday,at first i thought i had made a mistake in the connection,then i re-did everything but the same.I even thought i bought a faulty LCD,then went back and bought a new one but all the same
|
|
|
|
|
9
|
Using Arduino / Displays / Re: Request Help with Interfacing LCD 162A with arduino
|
on: March 21, 2012, 04:34:30 am
|
|
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); }
void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis()/1000); } That is the code i am using
|
|
|
|
|
10
|
Using Arduino / Displays / Re: Request Help with Interfacing LCD 162A with arduino
|
on: March 21, 2012, 04:13:31 am
|
|
yeah i have used the Hello world sketch from the liquid crystal,the resistors are 10k Ohms,i went further to ground pin 5,and its still the same problem.i have just bought a JHD162A LCD,and have tried interfacing it with arduino but all in vain,tried every possible thing but cant get it to display anything,I connected it exactly like this and ran the hello world code,but am just getting the backlights lighting,no display,i have tried grounding pin 5 of the LCD,still nothing,please help me get out of this state of quagmire,i have been doing the same circuit since yeaterday,at first i thought i had made a mistake in the connection,then i re-did everything but the same.I even thought i bought a faulty LCD,then went back and bought a new one but all the same.Sorry if this is a really stupid question! I really have no idea and so am asking
|
|
|
|
|