Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Project Guidance / Re: Human Following Robot Project on: April 21, 2014, 04:51:53 pm
did the code work\?
2  Using Arduino / Project Guidance / Re: Robot Follow Project on: April 21, 2014, 04:51:41 pm
may i ask how far have you gotten into this project?

i am also planning on building somthing like this
3  Using Arduino / Displays / 0.84" OLED Display 96×16 on: January 13, 2014, 11:42:28 am
hello i have bought a 0.84" OLED Display 96×16 from http://sabernetics.com/

but i have a problem there library is one that has been adapted for a smaller display
but it does not support scrolling

can sombody add scrolling or help me add scrolling to it

http://sabernetics.com/store/0-84-oled-display-96x16/
4  Community / Bar Sport / Re: Water & Sound & 24 Hz sine wave on: January 11, 2014, 07:36:47 pm
i am already working on it

i am kind of stuck on the sinewave
i cant find out how to get a simple sinewave with the power to drive a solenoid
5  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 08:11:22 pm
sorry that i am such an pain in the ass somtimes

my learning proses involves learning from other people's work (why would we reinvent the wheel)

and that makes me a dick somtimes

the script i fabricated
consists of 3 or 4 scripts made into one working (but crappy whole)
6  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 07:28:51 pm
please do come by if you want some coffie

i also found it out

how to dail-call and output

i am hooking up the gprs shield as we speak

and after testing it sends the corect caracter set
but it does not call
after adding a bit of line it suddenly works

onwards it should be not so hard anymore


Code:

 
#include <SoftwareSerial.h>
#include <String.h>
 
SoftwareSerial mySerial(7, 8);




int needToPrint = 0;
int count;
// mine
const int try_it = 3;
const int in_from_dial = 2;
int test;


int buttonState = 0;         // variable for reading the pushbutton status
int firstnum = 0;
char played = 'N';
// end mine


int lastState = LOW;
int trueState = LOW;
long lastStateChangeTime = 0;
int cleared = 0;

// constants

int dialHasFinishedRotatingAfterMs = 100;
int debounceDelay = 10;

// strings
String newstring;
 
void setup()
{
 
  pinMode(in_from_dial, INPUT);  // 2
digitalWrite(in_from_dial, HIGH);
pinMode(try_it, INPUT);  // 3

pinMode(13, OUTPUT);    // 12
  mySerial.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);    // the GPRS baud rate
  delay(500);
}
 
void loop()
{
 
 digitalWrite(13, HIGH);   // set the LED on
/*
user will dial numbers until they hit the "try it" buttonb
so need to create string until button is pressed
*/
// read the state of the tryit button

  buttonState = digitalRead(try_it);
// try_it = HIGH;
if (buttonState == LOW)   {

int reading = digitalRead(in_from_dial);

if ((millis() - lastStateChangeTime) > dialHasFinishedRotatingAfterMs) {
// the dial isn't being dialed, or has just finished being dialed.
if (needToPrint) {
// if it's only just finished being dialed, we need to send the number down the serial
// line and reset the count. We mod the count by 10 because '0' will send 10 pulses.
  Serial.println(count % 10, DEC);

// now need to add the count to the test string and then test it against the
// required string to get a hit
newstring.concat(count % 10);

Serial.println("ATD + +31" + newstring + ";");


needToPrint = 0;
count = 0;
cleared = 0;
}



}

if (reading != lastState) {
lastStateChangeTime = millis();
}
if ((millis() - lastStateChangeTime) > debounceDelay) {
// debounce - this happens once it's stablized
if (reading != trueState) {
// this means that the switch has either just gone from closed->open or vice versa.
trueState = reading;
if (trueState == HIGH) {
// increment the count of pulses if it's gone high.
count++;
needToPrint = 1; // we'll need to print this number (once the dial has finished rotating)
}
}
}
lastState = reading;
}

else
{
// now user wants to test his dialing
//
played = 'N';
//   Serial.println(newstring);
  test_it();
   newstring = "";

}
 
}
 
 
 void test_it()
{
  mySerial.println("ATD + +31" + newstring + ";");//dial the number
Serial.println("ATD + +31" + newstring + ";");//dial the number
delay(10000);
mySerial.println("ATH");
Serial.println("ATH");
newstring = "";
loop();

}
 

void ShowSerialData()
{
  while(mySerial.available()!=0)
    Serial.write(mySerial.read());
}
7  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 06:42:21 pm
i have run trough all beginner courses

but non helps me in the way i want

8  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 06:33:03 pm
yes but how does that work on the gsm module

it does not

the gsm module needs a full number


mySerial.println("ATD + +31611******;");//dial the number
(this is in my call script)
9  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 06:29:14 pm
i want to store single numbers as one giant aray

like i said
i am dailing 1-2-3

arduino gives me
1
2
3

and i want it as
123

and then send it of to a gsm module and have it called
this works but is verry verry crude

Code:
int needToPrint = 0;
int count;
// mine
const int try_it = 3;
const int in_from_dial = 2;
int test;


int buttonState = 0;         // variable for reading the pushbutton status
int firstnum = 0;
char played = 'N';
// end mine


int lastState = LOW;
int trueState = LOW;
long lastStateChangeTime = 0;
int cleared = 0;

// constants

int dialHasFinishedRotatingAfterMs = 100;
int debounceDelay = 10;

// strings
String newstring;


// --------------------------------------------


void setup()
{
 
Serial.begin(9600);


pinMode(in_from_dial, INPUT);  // 2
digitalWrite(in_from_dial, HIGH);
pinMode(try_it, INPUT);  // 3

pinMode(13, OUTPUT);    // 12


}


void loop(){
  digitalWrite(13, HIGH);   // set the LED on
/*
user will dial numbers until they hit the "try it" buttonb
so need to create string until button is pressed
*/
// read the state of the tryit button

  buttonState = digitalRead(try_it);
// try_it = HIGH;
if (buttonState == LOW)   {

int reading = digitalRead(in_from_dial);

if ((millis() - lastStateChangeTime) > dialHasFinishedRotatingAfterMs) {
// the dial isn't being dialed, or has just finished being dialed.
if (needToPrint) {
// if it's only just finished being dialed, we need to send the number down the serial
// line and reset the count. We mod the count by 10 because '0' will send 10 pulses.
  Serial.println(count % 10, DEC);

// now need to add the count to the test string and then test it against the
// required string to get a hit
newstring.concat(count);

Serial.println(newstring);


needToPrint = 0;
count = 0;
cleared = 0;
}



}

if (reading != lastState) {
lastStateChangeTime = millis();
}
if ((millis() - lastStateChangeTime) > debounceDelay) {
// debounce - this happens once it's stablized
if (reading != trueState) {
// this means that the switch has either just gone from closed->open or vice versa.
trueState = reading;
if (trueState == HIGH) {
// increment the count of pulses if it's gone high.
count++;
needToPrint = 1; // we'll need to print this number (once the dial has finished rotating)
}
}
}
lastState = reading;
}

else
{
// now user wants to test his dialing
//
played = 'N';
//   Serial.println(newstring);
  test_it();
   newstring = "";

}
}
// --------------------- my functions -------------------------
// ------------------------------------------------------------




// --------------------------------------------------
// test the string

void test_it()
{

newstring = "";
loop();

}


// end of loop
10  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 06:23:07 pm
mmm that will not be suficent

i need to sent the array as one complete number

i found this script
it seems to store the complete number in one array

but i cant seem to print that
11  Using Arduino / Project Guidance / Re: Store and Forward Telephone Rotary Dial Pulses on: December 21, 2013, 06:08:54 pm
oooooohh

so if i were ti find out what millis has to be this would work?
12  Using Arduino / Project Guidance / Re: Store and Forward Telephone Rotary Dial Pulses on: December 21, 2013, 06:03:57 pm
while (millis - lastPulse < 750)

this gives an error

i cant find out why

13  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 05:50:45 pm
somthing like

anArray[] = { var1,var2,var3 };


does that work?

if so

then i dont know how i can count 9 diverent variables
14  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 05:15:13 pm
sorry i didnt ment to be harsh
i am just realy dutch
15  Using Arduino / Programming Questions / Re: rotary dail on: December 21, 2013, 05:09:45 pm
i dont get the joke
ityped correctly right

or you just troll?
Pages: [1] 2 3 ... 6