Show Posts
Pages: 1 ... 67 68 [69] 70 71 ... 93
1021  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 10:04:37 am
Oh sorry yes, had to look again.  Wanted to see if anyone is paying attention!  ;-)
The 1st and 2nd pins from the end.  Pins 0 and 1.
1022  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 10:02:02 am
With the camera hooked to 1,2,Gnd, V unconnected:
pin 1 - 1.3v
pin 2 - 1.1v

With the camera hooked to 1,2,V, Gnd unconnected:
both 5v

With all 4 connected:
3.6v
3.3v

With my voltmeter I cannot see any evidence of data received, it is too fast, but I see it on screen.
LED blinks while receiving and sending.  2 different ones.  I'm using Roboduino.
1023  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 09:32:18 am
8N1 works for receiving.  I used a wire to make a loop across 1,2 repeats back what I type.  I'm using Uno pins 1,2 to hook to camera.  I removed the 328 chip.  Is this wrong to try?  I know the yellow wire is working cuz loopback test.  Uno is TTL on 1,2.  I measured the resistance on yellow wire leading to camera 2 Meg same as white wire.  In case I typed the command wrong 10x I did try the tool.  Each time it says Cmd time out.  Next suggestion?
1024  Using Arduino / Project Guidance / No response any ideas? Grove camera on: February 16, 2012, 09:15:24 pm
I bought this:
http://www.seeedstudio.com/depot/grove-serial-camera-p-945.html

Hooked up serial TX,RX, 5v, Gnd. When I power it on I see on PC terminal:
.Ctrl infr exist
.User-defined sensor
.625
.Init end

But it does not respond to any commands. That means I hooked up the 4 wires correctly, not backwards. That means I have the correct baud rate. I tried sending:
0x56 0x00 0x26 0x00
and
0x56 0x00 0x36 0x01 0x00
nothing in response. Not the above text, Assembled a packet in X-CTU.

What can I test next? Please help!
1025  Using Arduino / Project Guidance / Re: Detect Disconnection on: February 16, 2012, 07:57:41 pm
This guy was working on a similar project...
http://pato22.atspace.com/up.html
http://www.angelfire.com/nj3/soundweapon/ultrasonics.htm

I thought everybody here should know about this!
;-)
1026  Using Arduino / Project Guidance / Re: Ethics & Arduino on: February 15, 2012, 08:16:33 am
I know somebody who gives away Starter Kits to kids by mail!
1027  Using Arduino / Project Guidance / Re: Animation Easing w servos AND steppers together on: February 14, 2012, 03:09:27 pm
This is the single motor version.  Not so different from 8 motors, but easier to understand.
Works with either Steppers OR Servos.  Next version both together.

Code:
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper.
#include <Servo.h>
#define dw digitalWrite
#define dm delayMicroseconds
#define wr32 Serial.write(32);
#define wr13 Serial.write(10);
const int mp1 = 4; // Blue   - 28BYJ48 pin 1
const int mp2 = 5; // Pink   - 28BYJ48 pin 2
const int mp3 = 6; // Yellow - 28BYJ48 pin 3
const int mp4 = 7; // Orange - 28BYJ48 pin 4
                        // Red    - 28BYJ48 pin 5 VCC
int motorSpeed=3000;    // set stepper speed, period actually
int stepnum=0;          // current microstep 0-7
int movecnt=0;          // running total of steps taken in move(), &=4095 in moveto
long ems,mst,m;         // millis()
int maxmove=0;          // ease()
float prev=45;          // eo_servo
Servo myservo;          // 22-155 deg

void setup() {
  pinMode(mp1, OUTPUT);
  pinMode(mp2, OUTPUT);
  pinMode(mp3, OUTPUT);
  pinMode(mp4, OUTPUT);
  pinMode(13, OUTPUT);  //onboard LED
  //Serial.begin(9600);
  myservo.attach(11);  //pin 11 end of row
  ems=micros(); //init easeoften() end of setup
}
void loop(){
//if(!eo_servo()){
if(!(m=easeoften(0,0))){
//if(!(m=eo_degrpm(95,1000))){
  //Serial.println(maxmove/11.377);
  //Serial.println(millis()/1000.0);
  //myservo.write(140);delay(300);myservo.write(22);delay(300);
  while(1);
}
//delay(10);  // <chgms/multsp-10
delayMicroseconds(m/2); //m/2 safe
}
int eo_servo(){
//multsp <1 jerky >4 plateau shaped
const float cellD2=6514; //ease.xls
const float multsp=3,multdeg=1.1;
const int degoffset=-22; //-22
const int chgms=74,mspa[]={ //from easeoften()
6450,3640,2413,1751,1338,1068,892,785,732,732,785,892,1068,1338,1747,2422,3640,6450,21015,
-21015,-6450,-3640,-2422,-1747,-1338,-1068,-892,-785,-732,-732,-785,-892,-1068,-1338,-1751,-2413,-3640,-6450,0};
int ii=chgms/multsp;
//int n=millis();
while(((m=millis())%ii)>5); //always catch 0? servo interrupt skipped this ==0
//Serial.print(m-n);wr32
int i=mspa[m/ii];
if(!i)return(0);
prev+=cellD2/i;
int deg=(prev+0.5+degoffset)*multdeg;
//Serial.print(m/ii);wr32
//Serial.print(prev);wr32
//Serial.print(cellD2/i);wr32
//Serial.print(deg);wr32
myservo.write(deg);
return(deg);
}
int eo_degrpm(int deg, int rpm100) {
//no floats used in easeoften()
const int chgms=74,rpm=2000,degmov=90; //from ease.xls
deg=(float(deg)/degmov-1)*chgms+0.5;
rpm100=(float(rpm100)/rpm-1)*chgms+0.5;
while(easeoften(deg,rpm100));return(0);
//return(easeoften(deg,rpm100)); //calcs floats every iteration
}
int easeoften(int adjdist, int adjspeed){
//do not change adjspeed,dist once you begin
//call every << return() micros about r/2
//line interval 74ms 20RPM see ease.xls
const int chgms=74,mspa[]={
6450,3640,2413,1751,1338,1068,892,785,732,732,785,892,1068,1338,1747,2422,3640,6450,21015,
-21015,-6450,-3640,-2422,-1747,-1338,-1068,-892,-785,-732,-732,-785,-892,-1068,-1338,-1751,-2413,-3640,-6450,0};
int easi=millis()/(chgms-adjspeed+adjdist); //might be late, plus adjspeed is shorter cuz faster
long i=abs(mspa[easi]);
if(!i)return(0); //done
long j=abs(mspa[easi+1]);  //next speed wrong 0 during last line
i-=long(adjspeed)*i/chgms;
j-=long(adjspeed)*j/chgms;  //not important used for return only
boolean bcw=(mspa[easi]>0);
if(bcw)stepnum++; else stepnum--;
if(bcw)movecnt++; else movecnt--;
if(movecnt>maxmove)maxmove=movecnt;
motorSpeed=1; //1?
ems+=i;
//no time to print
//Serial.print(movecnt);wr32
//Serial.print(easi);wr32
//Serial.print(ems);wr13
while(micros()<ems){  //blocking do something else too? 
};
st07();
//if(movecnt%55==0){  //5 deg
//Serial.print(movecnt/11.377);wr32}
if(j<i)i=j; //j or i smaller guess worst case, i is usually correct, so wrong 1/2 of the time
return(i); //could be too short to wait for next step, j not adj4speed above?, check micros()>ems+i-100 in loop
}
void st07(){
if(stepnum==-1)stepnum=7;
if(stepnum== 8)stepnum=0;
switch(stepnum){
case 0:
  dw(mp4, HIGH);
  dw(mp3, LOW);
  dw(mp2, LOW);
  dw(mp1, LOW);
  break;
case 1:
  dw(mp4, HIGH);
  dw(mp3, HIGH);
  dw(mp2, LOW);
  dw(mp1, LOW);
  break;
case 2:
  dw(mp4, LOW);
  dw(mp3, HIGH);
  dw(mp2, LOW);
  dw(mp1, LOW);
  break;
case 3:
  dw(mp4, LOW);
  dw(mp3, HIGH);
  dw(mp2, HIGH);
  dw(mp1, LOW);
  break;
case 4:
  dw(mp4, LOW);
  dw(mp3, LOW);
  dw(mp2, HIGH);
  dw(mp1, LOW);
  break;
case 5:
  dw(mp4, LOW);
  dw(mp3, LOW);
  dw(mp2, HIGH);
  dw(mp1, HIGH);
  break;
case 6:
  dw(mp4, LOW);
  dw(mp3, LOW);
  dw(mp2, LOW);
  dw(mp1, HIGH);
  break;
case 7:
  dw(mp4, HIGH);
  dw(mp3, LOW);
  dw(mp2, LOW);
  dw(mp1, HIGH);
  break;
}
dm(motorSpeed);
}
1028  Community / Products and Services / Re: Any Project services offered by me on: February 14, 2012, 02:46:57 pm
I've completed 2 different kinds of drug testing software.  One chooses victims for randomized employment drug testing.  Another uses statistical analysis to measure the success of new drugs before FDA approval.  Now if only the Arduino could collect urine from everybody using the bathroom during testing day, and throw away 99% of the samples without anyone knowing?  If you can't leave the building you won't likely miss a test!
1029  Using Arduino / Project Guidance / Re: Arduino Quadcopter on: February 14, 2012, 02:41:18 pm
My "theory" is that a Quad requires either an accellerometer or human input to keep from flipping.  Any other possibilities?
The IR sensor only works in some environments.
1030  Using Arduino / Project Guidance / Re: Animation Easing w servos AND steppers together on: February 13, 2012, 08:23:01 pm
Do you want to help by testing this when I'm finished the next version?  Anyone?
What is the best way to get Easing data into the Sketch?
1031  Using Arduino / Project Guidance / Re: Arduino Quadcopter on: February 13, 2012, 08:20:56 pm
You're correct it can measure fast rotation.  That's about 6 deg in a Hertz!  ;-)  Sorry 6 degrees in 1/50 sec.  So we can stop it from rotating violently.  Let's talk about Yaw for now.  If it is spinning slowly, say 30 deg / minute, the ENC-033r will not be able to measure it.  It will return a zero value.  If we can't measure it, how can we stop it from happening?  MarkT said this sensor is for short term control only.  So we need another sensor.  But some copters don't have another sensor.  Am I correct?
1032  Community / Products and Services / Any Project services offered by me on: February 13, 2012, 06:32:12 pm
I have been working with Microcontrollers for 25 years starting with Ford in a manufacturing environment. Everything had to work perfectly as millions of units passed thru it.  I have experience as a Project manager and Software developer working with Fortune 500 companies.  Plus I enjoy what I do at home!  My fees are fair, and I promise you will like the results.  I will tell you honestly if it can't be done, or if I'm overbooked.  I have references for you to read, both professional and personal, most of them related to Arduino.  Over 100 projects completed last year.  First hour discussing your project is free.  Check out my resume and profile:

https://www.freelancer.com/users/3242859.html

Questions?
1033  Using Arduino / Project Guidance / Re: Arduino Quadcopter on: February 12, 2012, 07:57:25 am
With smoothing, how can you detect <70deg of rotation / minute from a Piezo Gyro?  I don't see how smoothing helps with this problem.  You would be smoothing out real changes above this number.  It is the limit of the sensors ability to detect slow changes.  Somewhere in this neighborhood.  You would need an accelerometer, as Mark suggested.  What about most models which do not have them?  How do they stay upright?
1034  Using Arduino / Project Guidance / Re: Arduino Quadcopter on: February 11, 2012, 10:36:57 am
The models I've seen don't have accelerometers, only ENC-03 gyro.  I'm guessing they're dependent on human input every second or so, sorta like an old fashioned airplane.  No answer for my Litehawk?  It's a cheap toy!
1035  Using Arduino / Project Guidance / Re: Arduino Quadcopter on: February 10, 2012, 10:32:41 pm
Actually you can buy a kit with instructions for $100.  I agree it is difficult, but not impossible for a Beginner!
Pages: 1 ... 67 68 [69] 70 71 ... 93