Show Posts
Pages: [1] 2 3 ... 6
1  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/
2  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
3  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)
4  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());
}
5  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

6  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)
7  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
8  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
9  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?
10  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

11  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
12  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
13  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?
14  Products / Arduino GSM Shield / Re: gprs shield on: December 21, 2013, 05:01:17 pm
i found it out

i have rewritten the code of some guy here on the forums

Code:

 
 #include <SoftwareSerial.h>

 char inchar;                      // Will hold incoming character from the Serial Port
 SoftwareSerial GPRS(7,8);
 // unsigned char buffer[64];         // buffer array for data receive over serial port
 int count=0;                      // counter for buffer array
 int WTA = 13;                     //led
 int numring=0;                   
 int comring=1;


 void setup()
 {
   GPRS.begin(19200);              // the GPRS baud rate   
   Serial.begin(19200);            // the Serial port of Arduino baud rate.

   pinMode(9, OUTPUT);             // Power up SIM900 GPRS
   digitalWrite(9,LOW);
   delay(1000);
   digitalWrite(9,HIGH);
   delay(2000);
   digitalWrite(9,LOW);
   delay(1000);

   pinMode(WTA, OUTPUT);          // Defines pin 10 as a +5V Digital Output
   digitalWrite(WTA, LOW);        //Sets WT trigger back low
   delay(1000);

 } 

 void TriggerWTA()
 {
 // pinMode(WTA, OUTPUT);        // Defines pin 10 as a +5V Digital Output
 GPRS.println("ATA");                       //picks up when the led goes high
 digitalWrite(WTA, HIGH);        // Sets WT trigger HIGH
 delay(5000);
 digitalWrite(WTA, LOW);         //Sets WT trigger back low
GPRS.println("ATH");                //hangs up when led goes low
 
 }

 
 void loop()
 {
  if(GPRS.available() >0)          //If a character comes in from the cellular module...
  {
  inchar=GPRS.read();
  if (inchar=='R')
  {
  delay(10);
  inchar=GPRS.read();
  if (inchar=='I')
  {
  delay(10);
  inchar=GPRS.read();
  if (inchar=='N')
  {
  delay(10);
  inchar=GPRS.read();
  if (inchar=='G')
  {
  delay(10);
 
  numring++;                // So the phone (our GSM shield) has 'rung' once, i.e. if it were a real phone it would have sounded 'ring-ring'
  if (numring==comring)
  {
  numring=0; // reset ring counter
  TriggerWTA();
  }
  }
  }
  }
  }
  }
 }
15  Using Arduino / Programming Questions / rotary dail on: December 21, 2013, 04:58:59 pm
hello i have a question

i have a rotary dail

and i use this to read it
http://www.instructables.com/id/Interface-a-rotary-phone-dial-to-an-Arduino/

but now comes the problem
i need to save 9 numbers in a variable and i cant seem to find out how to do this

i need this for an arduino phone i am building

in the end i have to dail
+31 548 51****
(land city home)

can somone help me on this
Pages: [1] 2 3 ... 6