Show Posts
|
|
Pages: [1]
|
|
2
|
Using Arduino / Sensors / CapSense Code has changed significantly, where is the old code? new not so good
|
on: September 10, 2012, 03:11:35 pm
|
I'm wanting to use capsense library, and have been playing around this in the past, and its worked pretty well. Working on a project now and go back and search for capsense code and its changed significantly, looked pretty interesting so I tried it out but its not as sensitive and don't see how it can be made more sensitive, doing a bit of a search and it seems that the old capsense code links all point to this new code, http://arduino.cc/playground/Code/CapacitiveSensor?from=Main.CapSenseSo my question is 1) does anyone know how to make this more sensitive, I want to use it for proximity not direct touch. ( actualy its touch though a couple of layers of 3mm opaque perspex) 2) where is the old code and information, looking at the history it doesn't look like this code was ever the old capsense code that I know and used i.e. #include <CapSense.h>
|
|
|
|
|
4
|
Using Arduino / Programming Questions / How do I debug a new class in arduino IDE
|
on: February 09, 2012, 08:21:20 pm
|
Hi I've decided that I want to create some classes to make my life easier. The first one that I wanted to create was a "Line". I get an error message and want to figure out how i can debug this?, this is my code: #include <Line.h>
Line line();
void setup() { // put your setup code here, to run once: line.set(1, 2, 3, 4); }
void loop() { // put your main code here, to run repeatedly: }
This is my error message: ColourSphereCode.cpp: In function 'void setup()': ColourSphereCode:6: error: request for member 'set' in 'line', which is of non-class type 'Line ()()' ColourSphereCode.cpp: In function 'void loop()': ColourSphereCode:11: error: request for member 'm' in 'line', which is of non-class type 'Line ()()'
And this is my Line.h: /* */ #ifndef Line_h #define Line_h
#include "Arduino.h"
class Line { public: Line(); void set(double x1,double y1,double x2,double y2); double m(); double c(); private: double _x1; double _y1; double _x2; double _y2; };
#endif
and this is my Line.cpp:
#include "Arduino.h" #include "Line.h"
Line::Line() { }
// define the two end points of the line void Line::set(double x1, double y1, double x2, double y2) { _x1 = x1; _y1 = y1; _x2 = x2; _y2 = y2; }
// return the slope of the line double m() { return 1.1; }
// return the offset of the line double c() { return 2.3; }
so it would be great if someone can see where I'm going wrong but it would be even better if there is an 'easy" way that I can learn how to debug these errors and work with developing classes. The morse example looks a little thin on the ground for this, but maybe there is another place that I can look? Moderator edit: [code] [/code] tags added.
|
|
|
|
|
6
|
Using Arduino / Microcontrollers / Re: Arduino as ISP, Mininial Circuit Error- pins_arduino.h No such file..
|
on: February 03, 2012, 09:56:40 pm
|
Hi Karl_b thanks for that, tried what you said and added that line to boards but made not difference  Deleted the boards from from my sketchbook location and appended the boards information to the boards.txt file in ...arduino-1.0\hardware\arduino (not sure that its good practice but ...) This compiled  so that was good news. But still was not uploading properly. So I compared the information with Attiny code that uses the arduino as ISP and noticed that "Atmega328 on breadboard" that this line "atmega328bb.upload.protocol=stk500" seemed strange to me so I replaced it with "atmega328bb.upload.using=arduino:arduinoisp", which is what we are doing. This worked  so I'm very happy with. So here is my boards information for AtMega328 on breadboard(8Mhz internal clock), thanks for you help Karl_b great to get jigwas together. If anyone can see any problems with this let me know. ##############################################################
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.using=arduino:arduinoisp atmega328bb.upload.maximum_size=30720 atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2 atmega328bb.bootloader.high_fuses=0xDA atmega328bb.bootloader.extended_fuses=0x05 atmega328bb.bootloader.path=arduino:atmega atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex atmega328bb.bootloader.unlock_bits=0x3F atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p atmega328bb.build.f_cpu=8000000L atmega328bb.build.core=arduino:arduino atmega328bb.build.variant=standard
|
|
|
|
|
9
|
Using Arduino / Microcontrollers / Re: Arduino as ISP, Mininial Circuit Error- pins_arduino.h No such file..
|
on: February 03, 2012, 12:44:56 am
|
|
Hi John thanks for your last comment. Still learning this environment and now see what you mean. I've reinstalled everything and makes not different but it is a verify/compile issue not upload.
This time tried with blink example code (no changes and just used everything as described). Here is the error C:\Arduino\arduino-1.0\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=100 -IC:\Arduino\arduino-1.0\hardware\arduino\cores\arduino C:\DOCUME~1\User\LOCALS~1\Temp\build3115065296870135004.tmp\Blink.cpp -oC:\DOCUME~1\User\LOCALS~1\Temp\build3115065296870135004.tmp\Blink.cpp.o In file included from Blink.cpp:8: C:\Arduino\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory
can anyone point me in the right direction to fix this issue?
|
|
|
|
|
10
|
Using Arduino / Microcontrollers / Re: Arduino as ISP, Mininial Circuit Error- pins_arduino.h No such file..
|
on: February 02, 2012, 10:03:17 pm
|
|
I was trying to upload a sketch to a blank atmega328. I'll reinstall and have another go. I have been able to upload other sketches but just not via arduino as ISP. I was thinking it was something, maybe to do with the "atmega on breadboard (8Mhx internal clock)" board file that was installed i.e. the breadboard.zip. When I looked at it I didn't see anything that referenced arduinoISP, this is what it is: ##############################################################
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.protocol=stk500 atmega328bb.upload.maximum_size=30720 atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2 atmega328bb.bootloader.high_fuses=0xDA atmega328bb.bootloader.extended_fuses=0x05 atmega328bb.bootloader.path=arduino:atmega atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex atmega328bb.bootloader.unlock_bits=0x3F atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p atmega328bb.build.f_cpu=8000000L atmega328bb.build.core=arduino:arduino
should be be "atmega328bb.upload.protocol=stk500"? anyway I will reinstall and see if that makes a difference.
|
|
|
|
|