Recent Posts

Pages: [1] 2 3 ... 10
1
Cross posting - reported
2
are you planning to use TCP or UDP communicaion? 
have a look at the following for some examples of C# servers and clients
http://csharp.net-informations.com/communications/csharp-socket-programming.htm

on the Arduino have a look under File > Examples > WiFi you will find examples code for servers and clients
3
Project Guidance / Re: 100+ encoders
Last post by wvmarle - Today at 03:50 pm
The MCP23018 can handle 3.4 MHz I2C bus, but even so with the start/stop bits and sending all the commands communication easily adds up to maybe 60 bits total, which takes some 17µs. With the interrupts to guide you, you still have to read three chips to get to the triggered pin, and that's 54 µs before you start doing anything with that data. That sounds very possible.

However if there's a good chance of multiple inputs at the same time, you have to scan all of them: 16 scans of 17 µs each makes 272 µs. Still ample time left to do something useful and do it all over again within 1 ms.

This assumes you run your I2C bus at 3.4 MHz! And there we hit another problem: on Arduino's (with their 16 MHz ATmega) it seems the bus speed is limited to 400 kHz, which makes it too slow. Your interrupt assisted scan would take 500 µs, the complete scan about 2.5 ms. So with the interrupts it would fall within the 1 ms per scan requirement and allow you some time to do other things, like doing something useful with the data and writing some outputs or so.

On the 80 MHz ESP8266 the I2C is also limited to 400 kHz (it's all done in software), but at least no need for an I2C multiplexer which may add additional delays in communication.

The SPI bus should be faster than this, allowing for faster communications, and may be an option to speed up the process and be able to read your inputs faster.
4
V'ger needs more data....

what sensor(s) are you using ?  is this all in software ?
does inertia have any effect ?

One way  is to use the center of the space as 0,0,0
although you move from there to some other place, you are still referenceing your absolute coordinates based on 0,0,0

your new relational coordinates would not change your absolute, only plot where you are.  

you should be able to have two simultaneous 2D calculations to give you location in your 3D environment.
5
Hardware / Re: Mal funcionamiento
Last post by rafa2699 - Today at 03:49 pm
ya lo hice. le cargo el programa de ejemplo del led y funciona bien. pero le cargo un programa en blanco y se queda prendido
6
Probably a stupid question but I'm trying to debounce 3 buttons as an array
Code: [Select]
debouncer.attach(buttonPin[1]);
I can understand it won't work because you need a separate instance of bounce for each pin but how can I work my way around this problem of debouncing an array of inputs? Forgive my ignorance but I'm a bit clueless with programming!
7
Project Guidance / Arduino and ESP8266 - TCP Comm...
Last post by Ne-Edwin - Today at 03:48 pm
Hey guys,

Recently I bought an Arduino UNO R3 and an ESP8266 and wanted to start a project. For this project I need to send a string from a webserver to the Arduino. Therefore I'm looking for a way to receive a package via TCP/IP, but since I'm pretty new in working with the Microcontroller I wanted to ask if anyone can help?

Basically I need to to program the Arduino to receive those TCP packets with the ESP8266. 

I tried to use the ESP8266WiFi library to get started but already here I got stuck.
(Link to the Library: https://github.com/EdwinNe/Arduino/tree/master/libraries/ESP8266WiFi)

I always get this error message:

In file included from /Users/Edwin/Documents/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.h:28:0,
                 from /Users/Edwin/Documents/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFi.h:34,
                 from /Users/Edwin/Documents/Arduino/TCP-Communication/TCP-Communication.ino:1:
/Users/Edwin/Documents/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory
 #include <functional>


8
Software / Re: secuencia de led incorrect...
Last post by Adrian_E - Today at 03:48 pm
bien, bien, surbyte cuando decis vetor te referiz a usar una matriz?, sigo anotando pero ahora me da error de compilacion como que falta un ) o sobra )
Code: [Select]
unsigned long interval = 1000;
unsigned long cumillis;
unsigned long  tiempo =0;

int matriz [] {8,9,10,11,12};

int cont =5;

void setup()
{
  for(int pin=0; pin < cont; pin++){
    pinMode (matriz[pin], OUTPUT);
  }
}

void loop()
{
  cumillis = millis();

  if(cumillis - tiempo <= interval){
    tiempo = cumillis;

    for(int pin =0; pin < cont; pin++){
       
      digitalWrite (matriz [pin], !digitalRead matriz [pin]); //aca me da error y estoy trabado

       
       
    }
     
  }
}
9
Project Guidance / Sending notification text via ...
Last post by Jubilant - Today at 03:44 pm
Hello guys, i'm pretty new in arduino and i am having trouble with my current project which is when it detects fire, it will send message to notify me.

I am using
- Arduino mega 2560 ADK
- Arduino flame sensor (using AO)
- SIM 800L gsm module

I have assembled these and they worked fine using the given sketchbook example in arduino library.The problem comes is that when i try to combine these to work together.

For the SIM800L module,
TX - pin 10
RX - pin 11


For the flame sensor code,

Code: [Select]
const int analogPin = A0;    // Flame Sensor (A0) to Arduino analog input pin A0
const int BuzzerPin = 9;       // Buzzer output pin
const int threshold = 400;   // Flame level threshold

void setup() {
 
  pinMode(BuzzerPin, OUTPUT);

  Serial.begin(9600);
 
 
}

void loop() {
  // read the value of the Flame Sensor:
  int analogValue = analogRead(analogPin);
   //Serial.println(analogValue);
 
  if (analogValue > threshold) {
    digitalWrite(BuzzerPin, HIGH);
    //Serial.print("NO FLAME");
  }
  else if (analogValue == threshold){
    digitalWrite(BuzzerPin, HIGH);
    delay(400);
    digitalWrite(BuzzerPin, LOW);
  }
  else {
    digitalWrite(BuzzerPin, LOW);
    //Serial.print("FLAME");
 
    }
}


And for the gsm module text code

Code: [Select]
{
  mySerial.println("AT+CMGF=1");   
  delay(1000);
  mySerial.println("AT+CMGS=\"+xxxxxxxx\"\r");
  mySerial.println("Fire  Alert!");
  delay(200);
  mySerial.println((char)26);
  delay(1000);

}


Tried looking everywhere in google but it seems i have not found a proper solution for these.
Anybody can help me with these?
Sorry if i did not manage to follow the properly the correct way to post in the forum .First time doing so.
Any help would be greatly appreciated :)
10
Project Guidance / Re: Data Analytics for the int...
Last post by Hiroyoki - Today at 03:44 pm
Basically it is a simple project. I am using sensor DHT22 connect up to uno. As for the wifi, it will transmit/receive sensor data to the terminal. So for the wifi module, which module suit the function?
Pages: [1] 2 3 ... 10