IO interface with Arduino over Ethernet

More
20 Jul 2020 16:27 - 20 Jul 2020 16:33 #175267 by BosniaCNC
@gerritv: Marius specifically made it clear in his last post that he has not looked at the Mega port, it is not his code.
udpioMega.py:
#!/usr/bin/python
#udpioMEGA.py
# HAL userspace component to interface with Arduino board
# Copyright (C) 2015 Marius Liebenberg <This email address is being protected from spambots. You need JavaScript enabled to view it.>
# Mods to use Mega2560 Robi Akerley-mcKee <This email address is being protected from spambots. You need JavaScript enabled to view it.>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
udpioMEGA.ino:
void decodeRx(char* rxbuffer, int buflen)
{

if(rxbuffer[0] == 'D') {
STEPPORT = atoi(rxbuffer[STEPPORTDATA]);
DIRPORT = atoi(rxbuffer[DIRPORTDATA]);
XTRPORT = atoi(rxbuffer[XTRPORTDATA]);
for(int i=0; i< PWMCOUNT; i++) {
analogWrite(pwmpinmap,atoi(rxbuffer[PWMDATA + i]));
}
return;

STDLib.h :
extern int atoi(const char *__s) __ATTR_PURE__;

ERROR: char * cannot be translated into atoi (const char * ....)


forum.arduino.cc/index.php?topic=474206.0

I hope I was clear?
Best regards!
Attachments:
Last edit: 20 Jul 2020 16:33 by BosniaCNC.

Please Log in or Create an account to join the conversation.

More
20 Jul 2020 17:37 #175270 by gerritv
You just don't get it do you? Someone used Marius' code and ported it to the Mega. They chose to keep Marius' original copyright notice in the code, as they should. That does NOT make the port his code. In fact the line right below that indicates the name of the person who ported the code, i.e. Robi.

But hey, keep on going up this path, you could of course instead figure out what is wrong with the code and fix it yourself.

Please Log in or Create an account to join the conversation.

More
20 Jul 2020 20:15 #175272 by BosniaCNC
@gerritv:
But hey, keep on going up this path, you could of course instead figure out what is wrong with the code and fix it yourself.
- / -
Rest assured that I will fix it and make it functional.No need to doubt!

Please Log in or Create an account to join the conversation.

More
05 Mar 2021 16:18 #201102 by nickom44
Hi all, I'm experimenting with Arduino ethernet shield but I'm getting errors regarding the gwibber.microblog.can import. has anybody experienced this and come across any workarounds?

Thanks
Nick

Please Log in or Create an account to join the conversation.

More
08 Mar 2021 18:32 #201460 by nickom44
I have been looking into this issue and found using either:

STEPPORT = (int)(rxbuffer[STEPPORTDATA]); //Casting char buffer in rxbuffer[STEPPORTDATA] to an (int) then assign to STEPPORT seems to work.

My main issue now is bypassing the gwibber library, I don't understand why this is used and how to create a work around

(been experimenting with:
#received = service.recv(150) #Gwibber function for receiving data - no idea what it is
received = service.recvfrom(150) #USING SOCK instead of gwibber

But experiencing other problems

Please Log in or Create an account to join the conversation.

More
06 Feb 2022 12:03 #234095 by virencq
I also installed on arduino Uno. Under Halshow Iam not being able to toggle Input pins.
Please guide me how to use input/output from arduino.

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds
Powered by Kunena Forum