a pointer is always positive or null. when it's null, it means "undefined pointer" otherwise it indicates a byte location somewhere in memory. So > 1 is a way that is kinda technically almost correct to express the idea that it's not 0 (nor 1 as actually would be a bug if you were pointing at memory location 1...)
Now, semantically a pointer is not a number, it's an abstraction representing a memory address and thus the compiler does not like the idea of comparing with integers unless you were to cast that integer into an address.
Just do ptr != NULL && (which is very readable) or just indeed ptr && (which is kinda the same, the compiler transforms this into a boolean expression which will test the pointer against 0 which which is the null pointer properly cast, and return true or false) instead of > 1 which does not make much sense
Thanks!
The gcodecncdemo4axis can be compiled but have many bug and is too large to understend the code!
So ... the gcodecncdemo2axis is small and i can see and understand the code more easy ... but have many bugs!
Another error:
This error i try many times when try to compile another programs...
can be double library for one function?
Is a easy to fix?
wiring.c:49 or stepper.c:416 for __vector_16
i can delete one of this line?
I want hear only that is easy to fix problems or maybe is a good idea to leave this program?
Because is many copy of this file on internet ... but all is same... i dont know if is file broken... i thing that my arduino program is not set corectly !
Actually exists many programs and microcontrollers!
But the cheap way is arduino atmega328 with grbl .
But not remain space to include more code and grbl for atmega168 not find anywhere.
Second problem is that now is generally used microusb connector (fig 1):
core.a(wiring.c.o): In function `__vector_16':
F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\hardware\arduino\cores\arduino/wiring.c:49: multiple definition of `__vector_16'
grbl\stepper.c.o:F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\libraries\grbl/stepper.c:416: first defined here
core.a(HardwareSerial.cpp.o): In function `__vector_18':
F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\hardware\arduino\cores\arduino/HardwareSerial.cpp:116: multiple definition of `__vector_18'
grbl\serial.c.o:F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\libraries\grbl/serial.c:160: first defined here
core.a(HardwareSerial.cpp.o): In function `__vector_19':
F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\hardware\arduino\cores\arduino/HardwareSerial.cpp:229: multiple definition of `__vector_19'
grbl\serial.c.o:F:\$_ce _trebuie_avr\arduino-1.0.4-windows\arduino-1.0.4\libraries\grbl/serial.c:106: first defined here
but same you can click right mouse on photo and click "open image in another window"
but same you can click right mouse on photo and click "open image in another window"
why would you make it complicated for you and us to help you out?
Text is easy to copy and paste, and "older folks" like me don't need glasses and can just increase font size to read about it
As said above - the error you see is about 2 libraries trying to use the same interrupt. Where did you get then code from?
J-M-L:
why would you make it complicated for you and us to help you out?
Text is easy to copy and paste, and "older folks" like me don't need glasses and can just increase font size to read about it
As said above - the error you see is about 2 libraries trying to use the same interrupt. Where did you get then code from?
from here :
thanks!
So... the problem can be that have installed too many libraries in arduino libraries folder?
yeeeeeessssss
I delete a folder grbl from libraries , and now i can compiling!
But i thing that problems no finished here !