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, 08:59:12 pm
That was the first thing I did with X-CTU.  Hooked pin 0 to 1 on Uno.
1022  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 07:38:12 pm
Can anyone tell if my method is compatible with this?
FT232 IC shield.
See my pictures.

http://www.seeedstudio.com/depot/uartsbee-v4-p-688.html
It says TTL.  Uno pins 0,1 are TTL.  Any tests I can try?
Either the cam is broken, or it shouldn't work the way I'm using it.
My Uno does receive serial data from the camera the way it is connected in the picture above.
Thanks for looking Zoomkat!
1023  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 06:02:20 pm
Sure according to the forums.  They run a sketch and swap pins 0 and 1.  I'm trying to find a simple sketch to test it.  All the examples are more complicated.  Do you think that will make the difference?  Many people have used the Comm tool software.  It's very simple wiring as you can see in the pics above.  There is no suggested circuit to hook it to the PC.  It would be like telling you how to hook up a 1.5v bulb to a battery.  Simple.  But not working.  Either I forgot to hookup both wires at the same time, or the bulb is out?  Any ideas? 

Thanks for listening everybody!  Sometimes just typing, in the past, has helped me solve the problem.
1024  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 12:49:36 pm
That seems to be the most likely cause.  Unless I'm doing something really stupid.  
This should be easy for me, I've been making serial interface circuits since college, of all different types.
If I could think like a beginner, maybe it would help?

Let's say it was a returned item.  Or somebody tried to connect it here without my noticing, the wrong way.
If they connected it wrong, it would damage the yellow wire output, not the white wire input, as is the case today.
With a 5v PS, it's hard to damage an input pin.

Nobody is going to say I connected Yellow (TX) to TX on Uno?  RX to RX?  That seems wrong?
You didn't notice?
If you did you're all too smart!
Do you understand why?
Or maybe you just trusted me when I said I received the Init text.
1025  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 11:53:16 am
The diagnostic software called VC 0706 Comm tool shows the received message when I power up.  I had to reassign Com66 to Com1 in control panel, as it only supports 1-20.  I get the same results with X-CTU when I manually send the 4-byte packet.  I tried a different board, with a different higher port number in X-CTU.  Not reassigning it.  Same results. 
1026  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 11:44:53 am
This is how it is connected.  Probably some very stupid mistake...
If you find a simple error IOU!
Like for example forgot to turn on PC...
1027  Using Arduino / Project Guidance / Re: No response any ideas? Grove camera on: February 17, 2012, 10:41:46 am
Tried a different brand Uno.  Same results.  Their diagnostic software wouldn't work if I failed to connect the white wire.  If it was a bad or loose connection.  That's why I measured it with ohmeter.  If I hooked it to wrong pins (1&2!).  Great catch Magagna.  Unfortunately not the problem...
1028  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.
1029  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.
1030  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?
1031  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!
1032  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!
;-)
1033  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!
1034  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);
}
1035  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!
Pages: 1 ... 67 68 [69] 70 71 ... 93