cocktailyogi / EggDuino

Arduino Firmware for Spherebot / Eggbot integration in Inkscape
MIT License
91 stars 138 forks source link

Connection to EggBot extensions #3

Closed bernabap closed 9 years ago

bernabap commented 9 years ago

I don't think there is a bug with the extensions, isn't just trying to find an EiBotBoard?

As we are using something else I tried to change the VID/PID number at line 6 of eggbot_scanwin32.py file to FTDI vendor ID and product ID as I am using arduino nano and it does the job:

hKey = _winreg.OpenKey( hReg, r"SYSTEM\CurrentControlSet\Enum\USB\VID_0403&PID_6001")

For Linux I just had to change from "ttyACM" to "ttyUSB" at line 28 of eggbot_scanlinux.py file.

BTW, great firmware thanks for sharing.

cocktailyogi commented 9 years ago

Hi bernabyp,

you patch works as well, but problem is that different Arduinos have different IDs.

I still think, there is a bug in eggbot-extension, because in eggbot.py calls function "getSerialPort" which first calls eggbot_scan.findEiBotBoards(). If that does not find anything (which is right, because we do not have an Eggbotboard with proper USB-ID), it is supposed to execute function eggbot_scan.findPorts(). Which looks for any devices on serialports.

Problem is, that if findEiBotBoards() does not find anything, findPorts() is not esecuted. I do not really understand why, but that is the problem. If we comment out that block with findEiBotBoards(), everything works like expected.

Yogi

jtronics commented 9 years ago

Hello, i tried to run your arduino-software with inkscape today, but it didn't work.

The arduino is working, because I get the answer "EBBv13_and_above Protocol emulated by Eggduino-Firmware V1.4<\r><\n>" The Inscape Script is connecting my board (led flashing), but get a wrong answer, so it stops. "Unable to find an Eggbot on any serial port. :( Error reading serial data."

SpeedGP commented 9 years ago

I have the same issue with jtronics. I've been searching for hours with no success. Unfortunately I have little to no programming experience, but still trying to work through.

Thank you for your work on Eggduino, I really appreciate it.

James

cocktailyogi commented 9 years ago

Pid patching is not recommended method. Disable autoreset on arduinoboard. Evey board has its own instructions.

SpeedGP commented 9 years ago

Yeah, I was just about to post this. I just got everything working by using a capacitor on my Uno instead of the recommended resistor. Thanks for your prompt response. And thank you so much for all your effort on this project :)

bosko90 commented 7 years ago

Hello everybody. I want to make eggbot but I almost suffered a mental breakdown. I'm trying for three days and does not work.

problem1

and

problem2

but without any luck. I gave up over all. I have Arduino nano clone with CH340

duezero commented 7 years ago

@bosko90 this worked for me EggDuino-master.zip

bosko90 commented 7 years ago

I try these but: error: 'sendAck' was not declared in this scope

bosko90 commented 7 years ago

Which version of arduino IDE do you use? and version of inkscape and eggbot extension?

SpeedGP commented 7 years ago

I have had a ton of problems with Arduino IDE, you have to use the exact right version, or else it doesn't work

-James--

On Fri, Feb 10, 2017 at 10:10 AM, bosko90 notifications@github.com wrote:

Which version of arduino IDE do you use? and version of inkscape and eggbot extension?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279020849, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIGZE7H2sd62cIh0hXGD-8OLNIa8Dks5rbKgEgaJpZM4Dqxy- .

duezero commented 7 years ago

IDE 1.8.0 -- eggbot 2.7.1 on linux (kubuntu)

bosko90 commented 7 years ago

I have IDE 1.8.1, eggbot 2.7.1 on windws and eggduino from your link. no luck :( I try with nano and uno.

duezero commented 7 years ago

ok try this EggDuino.zip

duezero commented 7 years ago

I'm using a UNO stadalone

bosko90 commented 7 years ago

ok now it was without error. But if i type anything in serial console it won't answer anything, for check serial comunication.

I have connecter 5V pin with 100 ohm resistor to rst

duezero commented 7 years ago

Have you tried different settings in serial monitor? I don't remember now which ones are correct.

Usually I use 1k or 10k resistor on reset pin in my standalone board but I dont think it's the problem

bosko90 commented 7 years ago

now I was trying all possible baud rate and add 10k ohm resistor.. and nothing

bosko90 commented 7 years ago

If I try arduino sample: Serial Call and Response it work normaly.

duezero commented 7 years ago

try setting " NL&CR 9600baud" and then type "TP". The response should be "OK"

bosko90 commented 7 years ago

OK that works! thanx.. one step closer.. Inkscape still say: Failed to connect to EggBot. :( Hod can I fix code in "eggbot.py"? instructions that I found are for version 2.4.0. in 2.7.1. there is no such code. problem2

duezero commented 7 years ago

The problem could be the reset pin. If I use an Arduino UNO board, Inkscape fails. Using an Arduino standalone (ATMEGA328 on a breadboard) with reset pin disconnected from the reset signal Inkscape works.

bosko90 commented 7 years ago

Are you make any changes on Inkscape extension? Now I try 100 ohm and 10k ohm.. no difference..

SpeedGP commented 7 years ago

Have you been able to upload the firmware to the Arduino?

On Feb 10, 2017 11:40 AM, "bosko90" notifications@github.com wrote:

Are you make any changes on Inkscape extension? Now I try 100 ohm and 10k ohm.. no difference..

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279045683, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIJF6X0JCn2M0ThWUOh7np-VhmWksks5rbL0fgaJpZM4Dqxy- .

bosko90 commented 7 years ago

Yes. In serial comunication I have response

duezero commented 7 years ago

No changes on Inkscape. Reset pin must stay always connected to 5V using a resistor, 10k is good (pull up). But shall be disconnected from the reset signal (which drives rst pin to ground triggering the reset) once you uploaded the program. You shouId try with a standalone MCU (or maybe cut physically the signal on your NANO but I'm not shure because I dont have a NANO)

bosko90 commented 7 years ago

here is my knowledge of electronics ends. It shows that this year we don't have Easter :/

SpeedGP commented 7 years ago

I feel like I had this same problem....

I'll look through pictures and see if I can find anything useful

-James--

On Fri, Feb 10, 2017 at 11:49 AM, duezero notifications@github.com wrote:

No changes on Inkscape. Reset pin must stay always connected to 5V using a resistor, 10k is good (pull up). But shall be disconnected from the reset signal (which drives rst pin to ground triggering the reset) once you uploaded the program. You shouId try with a standalone MCU (or maybe cut physically the signal on your NANO but I'm not shure because I dont have a NANO)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279048333, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIL8fOEoH7ECgj-_pgoafOLyfqckJks5rbL9ggaJpZM4Dqxy- .

bosko90 commented 7 years ago

Now I have response: unknown CMD..

SpeedGP commented 7 years ago

I HAD THIS EXACT ISSUE!!!!!

I think this is how I fixed it!!! (Image attached)

You may be able to see my arduino behind it with the breadboard and stuff plugged in also...may help https://youtu.be/l_Jm1lLs5U4

-James--

On Fri, Feb 10, 2017 at 12:05 PM, James Hilferty james.hilferty@gmail.com wrote:

I feel like I had this same problem....

I'll look through pictures and see if I can find anything useful

-James--

On Fri, Feb 10, 2017 at 11:49 AM, duezero notifications@github.com wrote:

No changes on Inkscape. Reset pin must stay always connected to 5V using a resistor, 10k is good (pull up). But shall be disconnected from the reset signal (which drives rst pin to ground triggering the reset) once you uploaded the program. You shouId try with a standalone MCU (or maybe cut physically the signal on your NANO but I'm not shure because I dont have a NANO)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279048333, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIL8fOEoH7ECgj-_pgoafOLyfqckJks5rbL9ggaJpZM4Dqxy- .

bosko90 commented 7 years ago

I do not see the image.

SpeedGP commented 7 years ago

https://drive.google.com/file/d/0B6X9s6ncrqeqaWstaG5KZmJYV1U/view?usp=sharing

-James--

On Fri, Feb 10, 2017 at 12:15 PM, bosko90 notifications@github.com wrote:

I do not see the image.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279054616, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvICrw_GdYsskAYm826t_MUNssxw13ks5rbMV_gaJpZM4Dqxy- .

SpeedGP commented 7 years ago

This guy uses a nano and said he had some issues also. You should try this tutorial, or just use an Uno :P http://tomscircuits.blogspot.com/2016/05/a-low-cost-eggplotter.html

-James--

On Fri, Feb 10, 2017 at 12:22 PM, James Hilferty james.hilferty@gmail.com wrote:

https://drive.google.com/file/d/0B6X9s6ncrqeqaWstaG5KZmJYV1U/ view?usp=sharing

-James--

On Fri, Feb 10, 2017 at 12:15 PM, bosko90 notifications@github.com wrote:

I do not see the image.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279054616, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvICrw_GdYsskAYm826t_MUNssxw13ks5rbMV_gaJpZM4Dqxy- .

bosko90 commented 7 years ago

thanks for the link. I already tried that but with no luck. I searched the entire Internet and tried every possible solutions. It shows that I am incapable.

bosko90 commented 7 years ago

I will try with this second link

SpeedGP commented 7 years ago

Trust me, I had a ton of issue with the eggduino too....

Upload a different sketch to the nano and see if it's the board.

Did you try the Unicorn plugin or whatever?

Did you use any capacitors?

Have you tried a different USB cable?

Have you tried a different version of Arduino IDE?

-James--

On Fri, Feb 10, 2017 at 12:27 PM, bosko90 notifications@github.com wrote:

thanks for the link. I already tried that but with no luck. I searched the entire Internet and tried every possible solutions. It shows that I am incapable.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279057211, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIBOIQAWT3Q6gZE8H1aCGeB3DLG1qks5rbMhHgaJpZM4Dqxy- .

duezero commented 7 years ago

You should try Arduino standalone, it's not difficult as it seems ;) https://www.arduino.cc/en/Main/Standalone

bosko90 commented 7 years ago

I tried Unicorn plugin, but have a lot of errors in generating g code. I do not know with which program would then communicate with arduino. GRBL doesnt work. Now I do not have capacitors.

duezero: I don't have that much electronic. I am mechanical engineer.

duezero commented 7 years ago

I am mechanical engineer

Me too ;) trust me, try with standalone or try to cut reset signal on your NANO

bosko90 commented 7 years ago

I do not know where to get all the components. Especially in time.

Yura80 commented 7 years ago

Take a look at my branch ( https://github.com/Yura80/EggDuino ) for instructions how to patch version 2.7.1

SpeedGP commented 7 years ago

Here are all of the files I used in 2015 https://drive.google.com/open?id=0B6X9s6ncrqeqdHA2QmZnamFkeGc

I am not sure what worked, or why, but I'd assume your answer is in there somewhere...

I believe I used Arduino IDE 1.0.6 My Inkscape is version 2.4.1? something like that

You may try spherebot

Good luck. I'm out of ideas

-James--

On Fri, Feb 10, 2017 at 12:53 PM, Yura80 notifications@github.com wrote:

Take a look at my branch ( https://github.com/Yura80/EggDuino ) for instructions how to patch version 2.7.1 and

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279062864, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvICAN8EFsnyq-XsvPrmbqSkhOmSwKks5rbM5IgaJpZM4Dqxy- .

bosko90 commented 7 years ago

Yura80 where can I get VID/PID of my arduino? SpeedGP I will try..

Yura80 commented 7 years ago

Device Manager->Ports (COM & LPT)->[your arduino com port]->Properties->Details->Hardware IDs

bosko90 commented 7 years ago

I didn't find that.. but I tray:

alternatively, you can replace "EBBport = None" with your specific port number: EBBport = "COMxx" #Windows EBBport = "/dev/tty[something]" #Linux/Mac

change to "COM4" and it's wooooooork! for now. servo is moving.. Now I must connect the stepping motors. Hope it is work.. Yura80 thanx! and of course thanks to all of you I offer assistance. Now it is 8 hours behind me. If I need anything I write tomorrow.

SpeedGP commented 7 years ago

I guess we all assumed you had the correct COM port.... 51 did sound a little high, but who am I to judge. Glad you got it working!

-James--

On Fri, Feb 10, 2017 at 1:25 PM, bosko90 notifications@github.com wrote:

I didn't find that.. but I tray:

alternatively, you can replace "EBBport = None" with your specific port number: EBBport = "COMxx" #Windows EBBport = "/dev/tty[something]" #Linux/Mac

change to "COM4" and it's wooooooork! for now. servo is moving.. Now I must connect the stepping motors. Hope it is work.. Yura80 thanx! and of course thanks to all of you I offer assistance. Now it is 8 hours behind me. If I need anything I write tomorrow.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-279070066, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIKj8xftG2xH-fhf-pajITfFSBugkks5rbNXegaJpZM4Dqxy- .

bosko90 commented 7 years ago

No I always knew that is COM4. But in the extension for Inkscape I didnt know how to fix. your link has helped. Now I have to set the proper size of steps. The motor is rotated four times instead of once.

Asenom commented 7 years ago

Hello to you all,

I'm new to GitHub and joined to talk with you about my issue. I tried everything you posted before and i also tried @duezero versions of Eggduino. With the newest IDE 1.8. I can't get his sketch to run through my compiler. It get stuck everytime by this Part and I dont know how to fix it. " Helper_Functions:4: error: 'SELFPRGEN' was not declared in this scope SPMCSR &= ~SELFPRGEN;

exit status 1

'SELFPRGEN' was not declared in this scope"

Do you have any clue what I should change to your Sketch to get it running?

Funfact aside: I tried "Ejjduino" the Eggbot Version from jjrobot and it worked fine on my ArduinoMEGA. I could also connect it to Eggbot Inkscape extension, after some modifications. But it failed to move.

SpeedGP commented 7 years ago

Duezero posted this last time: Try this one

https://github.com/cocktailyogi/EggDuino/files/767494/EggDuino.zip

Or

https://github.com/cocktailyogi/EggDuino/files/767445/EggDuino-master.zip

Other than that, try older versions of IDE

On Feb 22, 2017 4:47 PM, "Asenom" notifications@github.com wrote:

Hello to you all,

I'm new to GitHub and joined to talk with you about my issue. I tried everything you posted before and i also tried @duezero https://github.com/duezero versions of Eggduino. With the newest IDE 1.8. I can't get his sketch to run through my compiler. It get stuck everytime by this Part and I dont know how to fix it. " Helper_Functions:4: error: 'SELFPRGEN' was not declared in this scope SPMCSR &= ~SELFPRGEN;

exit status 1

'SELFPRGEN' was not declared in this scope"

Do you have any clue what I should change to your Sketch to get it running?

Funfact aside: I tried "Ejjduino" the Eggbot Version from jjrobot and it worked fine on my ArduinoMEGA. I could also connect it to Eggbot Inkscape extension, after some modifications. But it failed to move.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cocktailyogi/EggDuino/issues/3#issuecomment-281853928, or mute the thread https://github.com/notifications/unsubscribe-auth/ALPvIAZZar2wPtJGuIAOka7wm-EPVl2Iks5rfNcfgaJpZM4Dqxy- .

duezero commented 7 years ago

Probably MEGA2560 is not supported yet. I have the same issue if I try to compile for a MEGA2560. You need to use an Arduino UNO or NANO (ATmega328). IDE1.8.1 works fine.

Maybe I'll check later if it's possible fix this issue but you don't really need a Mega2560 for this project

Asenom commented 7 years ago

Thank you for your reply, yeah i know it's some kind of overpowered, but it was already laying around so i gave it a try! Yeah, i will try out some other trouble shooting in the evening! Thank you! i would apreciate it!