473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

tengo un problema al copilar el copilador me dice: expected unqualified-id before '.'

estoy aprendiendo y no se que me falla en el codigo:

//todos los derchos reservados

#include "ArduinoNunchuk.h"
#include <Wiichuck.h>
#include <Wire.h>



void setup(){
Wiichuck.calibrate();
Wiichuck.init(0,0);

Serial.begin(9600);
}
Jul 23 '17 #1

✓ answered by weaknessforcats

Lo siento pero me espanol no es Bueno.

Este codigo:

Expand|Select|Wrap|Line Numbers
  1. Wiichuck.calibrate();
tiene una problema por que no hay un objecto. In este manera:

Expand|Select|Wrap|Line Numbers
  1. Wiichuck obj;
  2. obj.calibrate();
Escribime otra vez si no entiendes.

6 3568
weaknessforcats
9,208 Expert Mod 8TB
Lo siento pero me espanol no es Bueno.

Este codigo:

Expand|Select|Wrap|Line Numbers
  1. Wiichuck.calibrate();
tiene una problema por que no hay un objecto. In este manera:

Expand|Select|Wrap|Line Numbers
  1. Wiichuck obj;
  2. obj.calibrate();
Escribime otra vez si no entiendes.
Jul 23 '17 #2
#include <Wiichuck.h>
#include <Wire.h>

Wiichuck obj;


void setup(){
obj.init(0,0);
obj.calibrate();

Serial.begin(9600);
}

void loop(){
if(obj.poll()){

Serial.print("x: ");
Serial.print(obj.accelX());
Serial.print(" y: ");
Serial.print(obj.accelY());
Serial.print(" z: ");
Serial.println(obj.accelZ());

Serial.print("x: ");
Serial.print(obj.joyX());
Serial.print(" y: ");
Serial.println(obj.joyY());

Serial.print("C: ");
Serial.print(obj.buttonC());
Serial.print(" Z: ");
Serial.println(obj.buttonZ());
}
delay(100);
}

if(obj.buttonZ> 1) {
digitalWrite(5, HIGH);
}


}


Although I change the name of chuck to obj I still mark the same error sincerely I do not know what's wrong here is the program
full
Jul 26 '17 #3
weaknessforcats
9,208 Expert Mod 8TB
Donde esta el objeto Serial?

Mandame, por favor, in ejemplo de este error.
Jul 26 '17 #4
realmente estoy inciando en esto de la programacion y este es como mi quinto codigo el mensaje de error dice:
nuchuck_arduino:37: error: expected unqualified-id before 'if'

if(obj.buttonZ> 1){

^

nuchuck_arduino:41: error: expected declaration before '}' token

}

^

exit status 1
expected unqualified-id before 'if'

ejecuntando el codigo anterior



__________________________________________________ __________________
english

I'm really starting this programming and this is like my fifth code the error message says:
Nuchuck_arduino: 37: error: expected unqualified-id before 'if'

If (obj.buttonZ> 1) {

^

Nuchuck_arduino: 41: error: expected declaration before '}' token

}

^

Exit status 1
Expected unqualified-id before 'if'

Executing the previous code
Jul 27 '17 #5
weaknessforcats
9,208 Expert Mod 8TB
The compiler reports an error at line 37. This means that the compiler knew there is a problem when it got to the "if" on line 37. The actual error is before the if. It could be on any line before line 37.

Also, if you have many errors, only fix the first error. Then recompile. If there are still errors fix only the first one. Errors 2,3,4,5... may be caused by the first error and will disappear when the first error is fixed.

Es verdad que su ingles es mejor que mi espanol
Jul 28 '17 #6
Many thanks the real problem is that I did not write well the concept of if a council to carry out this conversation use translator and it seems we got very well
Jul 29 '17 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: RICARDO LOPEZ TREJO | last post by:
TENGO UN SUPER PROBLEMA, HICE UN DELETE A UNA TABLA EN SQL SERVER 2000 QUE NO DEBI HABER HECHO, COMO PUEDO DESHACER ESE DELETE.
1
by: Gigi Villaunher | last post by:
sono nell'ambito di una gestione di autonoleggio. ho un tabella "SERVIZI" fatta in questo modo: id ! dal ! al ! dalle ! alle ! idAutoMezzo ! idAutista Ora, io ho l'esigenza di creare due...
0
by: Jorge Gallardo | last post by:
Hola a todos.. Vereis tengo un problemilla. necesito transferir de una tabla unos datos a texto, hasta aqui todo bien. Pero uno de los campos de esa tabla contine numeros, que pueden ser 1, 10,...
0
by: Sergio | last post by:
Olá pessoal Estou com um problema num relatório, quando mando imprimir ou visualizar um determinado relatório com um subrelatório que tem varios campos entre os quais quant, preço, total, fazendo...
0
by: StellaAzzurra | last post by:
Salve, premettendo che non sono un esperta di access, vi pongo il mio problema. Sto facendo una rubrica con access ed avrei la necessità di fare in modo che se ad esempio un mio clienti avesse 5...
1
by: Juan | last post by:
Hola Grupo! Tengo el siguiente problema. Quiero desarrollar una aplicación ASP.NET con Visual Studio.NET y resulta que cuando quiero crear una me aparece el siguiente mensaje ...
1
by: Jose Joaquin de Haro | last post by:
En una máquina con Windows XP Profesional (SP2) me ha ocurrido que en Outlook Express, han desaparecido todos los correos electrónicos de las bandejas, he ido a la carpeta de almacen y he observado...
1
by: Franky | last post by:
Tengo un problema con un programa en vb6 sp6 que cuando lo instalo en un ordenador con sistema xp o nt, funciona todo correcto menos los menus y si pulso donde deberia estar el menu y que aparece...
11
by: Tomi Lindberg | last post by:
Hi, I'm trying to find a way to calculate a distribution of outcomes with any combination of dice. I have the basics done, but I'm a bit unsure how to continue. My main concern is how to make...
1
by: Josh Ibrahim | last post by:
Hello all, I am working on a dice game for my homework in a c++ class. I am suppose to calculate the odds and probability of 2 dice rolls x amount of times and list the probability as rand() error....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.