Hovercraft Out of 1Sheeld and brushless dc motors

Hi everyone. I'm on this project for about a month but this is not working out for me. If anyone could help me with controlling the brushless motors with 1Sheeld, I'd appreciate a lot.

What have you tried?
What works?
What does not work?

ShafiqurK: Hi everyone. I'm on this project for about a month but this is not woring out for me. If anyone could help me with controlling the brushless motors with 1Sheeld, I'd appreciate a lot.

I'm having some problems. I'm not going to tell you what the problems are. I'm not going to tell you what I'm trying to do other than a vague reference to a hovercraft. I'm not going to tell you anything about my problems. But can you help me fix my problems?

See the problem?

ShafiqurK: [...] woring out for me. [...]

Just wondering, is there an h or a k missing in the "woring"? It makes a huge difference in how to address the mysterious problem you have.

Okay, the wiring is good the problem is code. I’ve found a huge chunk of code that just triggers the motor to spin at a specific speed that I’ve to set during uploading. I need something that could be adjusted by the app from my iPhone.

This is the code I’ve been working on:

int STATE = 1;
int Arming_Time = 100;
int pin = 3;
int Pulse = 1000;
int Speed = 1350;

void setup() {
// put your setup code here, to run once:
pinMode(pin, OUTPUT);
for (Arming_Time = 0; Arming_Time < 100; Arming_Time +=1)
{
digitalWrite(pin, HIGH);
delayMicroseconds(1100);
digitalWrite(pin, LOW);
delay(20-Pulse/1000);
}
}

void loop() {

digitalWrite(pin, HIGH);
delayMicroseconds(Speed);
digitalWrite(pin, LOW);
delay(20-(Speed/1000));

}


I tried it to make simple with the Push button shield from the 1Sheeld app that I downloaded from App Store, then I used this code:

/* Include 1Sheeld library. */
#include <OneSheeld.h>
int STATE = 1;
int Arming_Time = 100;
int pin = 3;
int Pulse = 1000;
int Speed = 1350;

void setup()
{
/* Start communication. */
OneSheeld.begin();
pinMode(pin, OUTPUT);
for (Arming_Time = 0; Arming_Time < 100; Arming_Time +=1)
{
digitalWrite(pin, HIGH);
delayMicroseconds(1100);
digitalWrite(pin, LOW);
delay(20-Pulse/1000);
}
}

void loop()
{
/* Always check if the push button is pressed. /
if(PushButton.isPressed())
{
/
Put code */

digitalWrite(pin, HIGH);
delayMicroseconds(Speed);
digitalWrite(pin, LOW);
delay(20-(Speed/1000));
}

}


Nothing is working.

"Nothing" is a very big thing. I would hope something is working.

Did the phone pair with the shield?

Did you try one of the examples that came with the shield? There must be one that just turns on a LED light or something?