<commit_before>README.txt

The TSRP examples

EggShield/
GroveAQ/
PressureMat/
WaterSensor/
WeatherStation/

all make use of multicast UDP. This isn't supported by the standard Ethernet library, you'll need to patch the Ethernet library as below. Add the following to EthernetUdp.h directly after line 55,

virtual uint8_t beginMulti(IPAddress, uint16_t);	// initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use

then add the following code to the end of EthernetUdp.cpp,

/* Start EthernetUDP socket, listening at local port PORT */
uint8_t EthernetUDP::beginMulti(IPAddress ip, uint16_t port) {
    Serial.println("beginMulti()");
    if (_sock != MAX_SOCK_NUM)
        return 0;
    
    for (int i = 0; i < MAX_SOCK_NUM; i++) {
        uint8_t s = W5100.readSnSR(i);
        if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) {
            _sock = i;
            break;
        }
    }
    
    if (_sock == MAX_SOCK_NUM)
        return 0;
    
    
    // Calculate MAC address from Multicast IP Address
    byte mac[] = {  0x01, 0x00, 0x5E, 0x00, 0x00, 0x00 };
    
    mac[3] = ip[1] & 0x7F;
    mac[4] = ip[2];<commit_msg>Updated README.txt, issue #32<commit_after>README.txt


DHT-22
======

The WeatherStation/ example makes use of the DHT-22 temperature and humidity sensor. There are several libraries available to support this sensor, we used for the Adafruit library, 

https://github.com/adafruit/DHT-sensor-library.

which we found to be the most reliable.

Arduino 1.0.1 vs Arduino 1.0.5
==============================

The

PROGMEM prog_char *loopPacket1 = "..." ;

prototypes used in the examples were written for the 1.0.1 Arduino development environment. In the newer 1.0.5 environment these lines need to be changed to,

prog_char * const loopPacket1 PROGMEM = "..." ;


Multicast UDP
=============

All the TSRP examples make use of Multicast UDP. This isn't supported by the standard Ethernet library, you'll need to patch the Ethernet library as below. Add the following to EthernetUdp.h directly after line 55,

virtual uint8_t beginMulti(IPAddress, uint16_t);	// initialize, start listening on specified port. Returns 1 if successful, 0 if there are no sockets available to use

then add the following code to the end of EthernetUdp.cpp,

/* Start EthernetUDP socket, listening at local port PORT */
uint8_t EthernetUDP::beginMulti(IPAddress ip, uint16_t port) {
    Serial.println("beginMulti()");
    if (_sock != MAX_SOCK_NUM)
        return 0;
    
    for (int i = 0; i < MAX_SOCK_NUM; i++) {
        uint8_t s = W5100.readSnSR(i);
        if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) {
            _sock = i;
            break;
        }
    }
    
    if (_sock == MAX_SOCK_NUM)
        return 0;
    
    
    // Calculate MAC address from Multicast IP Address
    byte mac[] = {  0x01, 0x00, 0x5E, 0x00, 0x00, 0x00 };
    
    mac[3] = ip[1] & 0x7F;
    mac[4] = ip[2];
{'fraction_non_alphanumeric': 0.10698616267296658, 'fraction_numerical': 0.03442456969287884, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '109333', 'n_tokens_mistral': 1054, 'n_tokens_neox': 944, 'n_words': 346}