Show Posts
Pages: [1]
1  Using Arduino / Interfacing w/ Software on the Computer / Moving a cube in 3d, help needed. on: March 10, 2011, 09:35:35 am
here is the python code im using for blender 3d to move a 3d cube around one axis, I am using a potentiometer to control the position.. I want to know how can I use multiple potentiometer, like 2 more potentiometer and i can control position of box in 3d ? I am new to python, I don't know how to include multiple analog readings in python for more than one analog inputs from arduino ?

Thankyou

Code:

import serial
import Blender

serialport = serial.Serial('COM4', 9600)
ob = Blender.Object.Get ('Cube')
Blender.Window.WaitCursor(1)

for i in range(1, 500):
x = serialport.read(size=1)
y = 0.01*ord(x)
#print "y=", y
ob.setLocation(-3*y,2,2.55)
ob.setEuler(0,0,y)
ob.setSize(0.5,0.5,0.5)
Blender.Redraw()
if Blender.Window.TestBreak()==True:
brake()

else:
serialport.close()
Blender.Window.WaitCursor(0)


Arduino code:

Code:
void setup () {
  Serial.begin (9600);
}
void loop () {
 
Serial.print(analogRead(0)/4, BYTE);
delay (40);
}

2  Using Arduino / Installation & Troubleshooting / Re: i think i just lost my Arduino :? on: February 10, 2011, 11:53:16 am
sorry my bad :/ the blink prog is dafault burnt..

ITS RUNNING .. smiley-grin .. thanks .all smiley-grin
3  Using Arduino / Installation & Troubleshooting / Re: i think i just lost my Arduino :? on: February 10, 2011, 11:48:13 am
and ic is not heating up ..

4  Using Arduino / Installation & Troubleshooting / Re: i think i just lost my Arduino :? on: February 10, 2011, 11:44:34 am
OK after alot of tries and luck, i finally see that its working, i can see it on com port.

but here is the thing, its burning the program but its not running it on the board, plus I see the light blinking on board (where it says "L" right above TX and RX)

Im using UNO .

5  Using Arduino / Installation & Troubleshooting / i think i just lost my Arduino :? on: February 09, 2011, 12:51:38 pm
I used two 9 volt batteries with arduino, now i know the op voltage is between 9 and 12 , but i needed to run 2 servos,(here is how i did the connections http://tinypic.com/r/8yw4lx/7
after connecting in such a manner it was not running, so i did something really stupid, i connected the USB :/ the usb end of arduiuno heated up, aand its not running now :/.


Is there any way i can make it run, without buying a new one ?

please help
6  Using Arduino / Storage / Re: storing 'serial monitor' data in some text file on: February 05, 2011, 01:53:38 am
Thankyou very much sir.. i got it smiley


7  Using Arduino / Storage / Re: storing 'serial monitor' data in some text file on: February 05, 2011, 01:28:17 am
windows 7 doesn't have hyperterminal :/ do you have any alternative ?
8  Using Arduino / Storage / storing 'serial monitor' data in some text file on: February 04, 2011, 11:04:30 am
is it possible to store the "Serial Monitor" data, directly to some textfile ? like data being transmitted serially in real time can be stored in text file.

thank you
9  Using Arduino / Displays / Re: JHD162A - 44780 16X2 LCD Showing Giberish ! on: February 03, 2011, 02:30:16 am
int forcepin = A0; // force resistive sensor

#include <LiquidCrystal.h>


LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup(){
 

  lcd.begin(16, 2);

  Serial.begin(9600);
  pinMode (forcepin, INPUT);}

void loop()
{

int force = analogRead(forcepin);
delay(200);
Serial.println (force, DEC);


 if (Serial.available()) {
    lcd.write(Serial.read());
    }
}
10  Using Arduino / Displays / JHD162A - 44780 16X2 LCD Showing Giberish ! on: February 03, 2011, 12:44:58 am
greetings..

I tried to make LCD read the serial data via force resistive sensor, im getting the output on serial monitor, but for somereason LCD is showing giberish.

im using 9600 baud rate, do i have to change it ? or is it something else ?


Help please.
Pages: [1]