Recent Posts

Pages: [1] 2 3 ... 10
Software / Re: Problema con sensor DHT11
Last post by surbyte - Today at 04:53 pm
Primero lee las normas del foro, porque tu primer post no ilustra debidamente tu problema.
Debes informar de que hablas, incluyendo código, esquema y errores si los tienes.
Por favor, usa etiquetas.
I am working on a small project that has multiple String arrays and variables for each of the arrays.

I want to pass the arrays to a function but can not see how to tell the function which Array and variables to use in the function without hard coding the options in the function.

How can I simplify this code without having to change the Array - so only by making changes in the call to the displayList function, or in the displayList function itself ?

Code: [Select]

int ListIsActive = 1;

String ListItems1[] = {"x", "ITEM 1", "ITEM 2", "ITEM 3", "ITEM 4", "ITEM 5", "ITEM 6"};
int ListTop1 = 1;

String ListItems2[] = {"x", "sub item 1", "sub item 2", "sub item 3", "sub item 4", "sub item 5", "sub item 6", "sub item 7"};
int ListTop2 = 1;

// code in the main loop will change ListIsActive to 1, 2, 3, etc ( depending on other conditions ) and then call displayList()

void displayList() {

if(ListIsActive == 1){
if(ListIsActive == 2){
if(ListIsActive == 3){
if(ListIsActive == 4){
if(ListIsActive == 5){
if(ListIsActive == 6){

} // end of : void displayList

Proyectos / traducción entre dispositivos
Last post by kikinho - Today at 04:50 pm
Hola muy buenas a todos.

Soy nuevo en el foro y tengo un proyecto en mente que me gustaría saber si lo puedo llevar a cabo mediante Arduino o no.

El tema es el siguiente: Tengo un dispositivo "A" que manda información al software de un PC cada vez que hay una modificación, mediante ethernet.

El software del PC coge el código, lo traduce y lo manda al dispositivo "B".

Es decir: manda a el cual traduce y lo manda a (es un ejemplo)

La pregunta es: ¿puedo usar arduino para prescindir del PC?

La traducción seria a modo de ejemplo:


10/09/15 12:13:28 -- (RX)      00HV000018T00FS0000001450000000000020000000011010000001450001000000001000145000000000000000000000000000000000000000000001213100915


archivo de texto (nombre).txt con un texto plano que contenga los caracteres 20,21,22,23,24 y 25 de la entrada

Gracias de antemano y un saludo!
Here's the thing. When i upload code on the board everything looks fine. Servo moving, sensor sees obstacles and robot try to avoid it. BUT right after i plug it out and THEN plug it in again via USB robot behave differently. Starts moving slowly back and servo and sensor don't move. Until i plug it again via usb and upload code from the beggining
Software / Re: Dudas carga firmware modul...
Last post by surbyte - Today at 04:48 pm
¿Si quiero trabajar solamente con librerias ESP8266 para Arduino IDE tengo que preparar previamente los ESP8266 cargandoles un firmware de la misma forma que he descrito antes o simplemente tengo que compilar la aplicación en el IDE Arduino y cargarla desde el propio IDE?
Antes si, ahora no.

He probado nodemcu, ESP07 pero nunca un ESP01 (asi que este lo dejo con un ?)

¿Pero si hace falta un firmware de donde lo puedo descargar (Sin tener que usar comandos AT o Lua?
Hay un post en Documentación de Jopapa que explica como hacerlo.
Tambien hay otros hilos que explican que firmware usar.

Prueba este tutorial (Programming ESP8266 ESP-01 with Arduino) si usas un ESP01
Français / Re: fonction milli() delay dan...
Last post by hameau - Today at 04:47 pm

Il faut affecter à temps la valeur millis() dans le setup.


Programming Questions / Re: Need help with RGB led and...
Last post by INTP - Today at 04:44 pm
You are conflating the Analog INPUT designated pins as 'pins to use for analogWrite'. They have nothing to do with each other.

Change your LED pins to PWM capable pins (might have a ~ next to them on the board) and it will work.

As it is, when you random into a value too low to count as HIGH, nothing happens because your analogWrite is effectively digitalWrite LOW.
Project Guidance / Re: Getting Arduino Clock Cycl...
Last post by C2 - Today at 04:44 pm
Thanks for the links. I recall seeing frequency counter discussions on Gammon's site.

The first google result has input capture code on git hub. I spent time trying to understand it, but cannot.

It runs and when I insert a signal, I get this result:

Code: [Select]

0:4096437 0
1:15583074 0
2:409407 0
3:15583071 0
4:409408 0
5:15583070 0
6:409407 0
7:15583070 0
8:409407 0
9:15583072 0
10:409407 0

And a faster signal:

Code: [Select]

0:237 60043
1:799 60092
2:800 60141
3:799 60190
4:801 60239
5:798 60288
6:801 60337
7:799 60387
8:800 60435
9:799 60485
10:801 60535

And a 10 MHz sin did not seem to register.

I have not yet figured out what the results mean, and they seem to fluctuate more than I expect, but that is using the arduino clock. The input signals should be stable within picoseconds.
Bar Sport / Re: 'One Student One Arduino' ...
Last post by MAS3 - Today at 04:42 pm
Well, more doubts rise.

If you are in Nigeria, then why do you use a German mobile phone as contact number, and why is your site registered by German 1&1 ?

Arduino Yún / Serial communication Linux - m...
Last post by puiucristian - Today at 04:41 pm

I try to get the Arduion side to comunicate with the linux side via serial.
I tried IdeinoIO and firmata, but it's not really what, all I need is to send some messages from one side to the other, not set pins and such.

So, now i try to keep it as simple as possible.

See code below.

Sending data to arduino is simple, but the problem is when i try to send something back.

The problem is that when i try to send something back to linux side, it will trigger the linux console.

Is there any way to disable the linux console on the serial port?

on the linux side
Code: [Select]
var serialport = require('serialport');
var portName = '/dev/ttyATH0';
var sp = new serialport.SerialPort(portName, {
    baudRate: 115200
                return console.log('error opening port :<', err.message);

        setInterval(function() { sp.write('hello?');


and on the arduino the multi serial example

Code: [Select]

void setup() {
  // initialize both serial ports:

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte =;

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte =;
Pages: [1] 2 3 ... 10