Pages: [1]   Go Down
Author Topic: somebody can tell the mean.  (Read 364 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

int ultraSoundSignalPins[] = {0,1}; // 2 Ultrasound signal pins
int ultraSoundTriggerPin = 6;        // output pin to start Ultrasound signals
int pwm_a = 3;
int pwm_b = 11;
int dir_a = 12;
int dir_b = 13;
unsigned char analogPin = 0;

void setup() {
   
   Serial.begin(9600);
   for(int i=0; i < 2; i++) {
   pinMode(ultraSoundSignalPins, INPUT); // Switch signalpin to input
   }
   pinMode(ultraSoundTriggerPin, OUTPUT); // set this pin to output
  //give the sensors time to boot up
   delay(250);
   // send RX pin high to signal to chain to ping
   digitalWrite(ultraSoundTriggerPin, HIGH);
   delayMicroseconds(30);
   digitalWrite(ultraSoundTriggerPin, LOW);
   pinMode(ultraSoundTriggerPin, INPUT); // electrically disconnects the pin
   delay(50);








this i do not unstander ↓
what it means.


Serial.begin(9600);
   for(int i=0; i < 2; i++) {
   pinMode(ultraSoundSignalPins, INPUT); // Switch signalpin to input
   }
   pinMode(ultraSoundTriggerPin, OUTPUT); // set this pin to output
  //give the sensors time to boot up
   delay(250);
   // send RX pin high to signal to chain to ping
   digitalWrite(ultraSoundTriggerPin, HIGH);
   delayMicroseconds(30);
   digitalWrite(ultraSoundTriggerPin, LOW);
   pinMode(ultraSoundTriggerPin, INPUT); // electrically disconnects the pin
   delay(50);
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 596
Posts: 33271
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Two things
1) go back to that post by hitting modify, select the code, hit the # icon and save.
2) Can you point out what you don't understand in the code. The Serial.begin just under the arrow is a mistake, it should be removed.
Logged

Ontario, Ohio
Offline Offline
Full Member
***
Karma: 1
Posts: 208
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you asking? What are you trying to accomplish with the code? It looks like you are chaining two Maxbotix ultrasonic sensors. Where is your loop? \http://www.maxbotix.com/downloads.htm There you'll find links to datasheets, quick start guides, etc. If you're more specific with your question, you may get a more specific answer.
Logged

Pages: [1]   Go Up
Jump to: