Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: What does this Error mean and can I fix it? on: March 21, 2013, 11:57:01 am
I am a beginner at coding and all I know is that for my project (I have an Uno) I need to write a code that would send a serial over when I press a button to either c# or c++ that would read it and then transfer that into a keystroke. (I am trying to play emulator games, mainly Megaman)
2  Using Arduino / Programming Questions / What does this Error mean and can I fix it? on: March 21, 2013, 11:29:17 am
I am trying to program my joystick shield to be able to just activate a button and I continue to get this error. I even have the arduino library for buttons and I still get this error. What is my problem and is it fixable? Thanks! -A Highschool Student

 *  buttons.h
 *  One-shot and hold functions for buttons.
 *  Created by Franky on 29/01/09.
 *  Licensed under LGPL (free to modify and use as you wish)

#include <inttypes.h>

#define OneShot 0
#define Memory 1
#define Timer 2
#define OneShotTimer 3
#define MemoryTimer 4

#define ON 1
#define OFF 0
#define Pressed 2
#define Released 3
#define Hold 4

typedef uint8_t byte;

class Button {
Button(byte type);
void assign(byte pin);
byte check();
byte check(byte mode_v);
// Setters
void setMode(byte type_v);
void setTimer(unsigned int t);
void setRefresh(unsigned int r);
void turnOnPullUp();
void turnOffPullUp();

byte pin;
byte mode;
unsigned long hold_timer;
unsigned long refresh_timer;
unsigned int hold_level;
unsigned int hold_refresh;
bool previous;

 Button modes:
 - OneShot: OneShot only, returns 2 values (ON/OFF)
 - Memory: Returns (Pressed/ON/Released/OFF)
 - Timer: Hold System (OFF/ON/Hold)
 - OneShotTimer: Combi OneShot & Timer (ON/Hold/OFF)
 - MemoryTimer: Combi Memory & Timer

core.a(main.cpp.o): In function `main':
C:\Users\IAN\Desktop\arduino-1.0.3-windows\arduino-1.0.3\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to `setup'
C:\Users\IAN\Desktop\arduino-1.0.3-windows\arduino-1.0.3\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'

Pages: [1]