Send email on event with EtherCard | JeeLabs.net Forum

Send email on event with EtherCard

Thank you for your work on EtherCard. I have not used it yet, but it looks very promising. I have been using the etherShield libraries that I found via the geetech forums with good results.

My problem is that I want to send an email on a detected event (button press, temperature change, etc). Does the EtherCard library have this capability? I have not been successful doing this with the etherShield libraries. I have done this with the Arduino ethernetShield device (W5100), and the Arduino libraries. However, I would much rather use the ENC28J60 module to do this. I can handle the event detection portion. What I need help with is just the send an email part. Any advice would be greatly appreciated!

Thanks, MFM

Source: Send email on event with EtherCard | JeeLabs.net Forum

Send email on event with EtherCard | JeeLabs.net Forum was last modified: July 13th, 2017 by Jovan Stosic

strcpy(), strncpy()

Copy a string

Prototypes

#include <string.h>
char *strcpy(char *dest, char *src);
char *strncpy(char *dest, char *src, size_t n);

Description

These functions copy a string from one address to another, stopping at the NUL terminator on the srcstring.

strncpy() is just like strcpy(), except only the first n characters are actually copied. Beware that if you hit the limit, n before you get a NUL terminator on the src string, your dest string won’t be NUL-terminated. Beware! BEWARE!

(If the src string has fewer than n characters, it works just like strcpy().)

You can terminate the string yourself by sticking the '\0' in there yourself:

char s[10];
char foo = "My hovercraft is full of eels."; // more than 10 chars

strncpy(s, foo, 9); // only copy 9 chars into positions 0-8
s[9] = '\0';        // position 9 gets the terminator

Return Value

Both functions return dest for your convenience, at no extra charge.

Example

char *src = "hockey hockey hockey hockey hockey hockey hockey hockey";
char dest[20];

int len;

strcpy(dest, "I like "); // dest is now "I like "

len = strlen(dest);

// tricky, but let's use some pointer arithmetic and math to append
// as much of src as possible onto the end of dest, -1 on the length to
// leave room for the terminator:
strncpy(dest+len, src, sizeof(dest)-len-1);

// remember that sizeof() returns the size of the array in bytes
// and a char is a byte:
dest[sizeof(dest)-1] = '\0'; // terminate

// dest is now:       v null terminator
// I like hockey hocke 
// 01234567890123456789012345

See Also

Source: strcpy(), strncpy()

strcpy(), strncpy() was last modified: July 13th, 2017 by Jovan Stosic

sprint or strcpy in arduino ?

I have a function that gets a pointer , and it should then change that pointer to a new one, so void function (char *pointer) {    char data[40];   // some calculations    //send back respond     strcpy(pointer,data);   } I have read here that strcpy is a bad practice and that there are replacements(in Arduino? ) : http://stackoverflow.com/questions/12275381/strncpy-vs-sprintf What is the right command to change that pointer argument safely ?

Source: sprint or strcpy in arduino ?

sprint or strcpy in arduino ? was last modified: July 13th, 2017 by Jovan Stosic

Using DHCP Mode with Arduino and Ethernet Shield – EMBEDDED LABORATORY

Most of the Arduino users found problem in using DHCP mode with Ethernet Shield, this tutorial will help to solve most basic problems when using using Arduino and Ethernet Shield in DHCP Mode.

Source: Using DHCP Mode with Arduino and Ethernet Shield – EMBEDDED LABORATORY

Using DHCP Mode with Arduino and Ethernet Shield – EMBEDDED LABORATORY was last modified: July 13th, 2017 by Jovan Stosic

networking – How to see all computers connected to a network – Ask Ubuntu

I am in a LAN and there are 3 Ubuntu, 2 Kubuntu, 2 Windows XP and 2 Windows 7. What commands or tools are available to see what PCs are connected to the LAN that it shows the name of the PC and the IP. Similar to tools like Angry IP that show all PCs in a LAN.

Note that I do not know the IPs or names of the computers connected to the LAN. So the tool or command should look for them to.

Source: networking – How to see all computers connected to a network – Ask Ubuntu

networking – How to see all computers connected to a network – Ask Ubuntu was last modified: July 13th, 2017 by Jovan Stosic

DesignSpark PCB

DesignSpark PCB is a free electronics design software, (EDA software is a sub-class of computer-aided design (CAD) software.) Although there is no charge for the software, the user must register with the website to unlock the program and it displays advertisements which must be acknowledged before the user can begin working.

Source: DesignSpark PCB – Wikipedia

DesignSpark PCB was last modified: September 25th, 2017 by Jovan Stosic