Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 45 of 45

Thread: i2c slave controller for multiple slave arduino/teensies

  1. #26
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    i got 1khz spi slave working! (SPISettings(1000),MSBFIRST,SPI_MODE0)

    i am also using this to reinitialize the slave when the host resets via teensyX.reset();, slave runs this switch case code
    Code:
    if ( spi_data[1] == 0xFF0A ) ((*(volatile uint32_t *)0xE000ED0C) = (0x5FA0004));
    added all function status update of slave to master library, user will know (via a bool) any statuses of the slave
    Ex. if the slave was reset and the master was not aware of it, during the next transfer the slave will update the caller of it, this gives the user to re-run his slave's initialization code (if any). you could always hard code the values in the slave, but for remote purposes this can be useful (example, the slave resets, so it's spi slave cs pins are no longer output, or custom baud rates, master would catch that it went offline and re-set the pin back to output and just let the user code run it's normal course. I try to design it around hot plugability and self-recovery, the master already knows the slave status, ill have to write a function perhaps that the user would call to reset the status flag after he re-runs his init code

    as it stands now, spisettings of 1000 to 24 000 000 run at stock speeds without any serial errors seen, so this is good news

  2. #27
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    anyone consider a wireless master/slave setup? after the spi version i might work on a wireless protocol mcu controller protocol as i might need it for another project, any recommendations would be nice as writing protocols for every port can be quite time consuming ;P

    it can be wifi (preferably STABLE, the winc1500 blocks and locks up the mcu so im not interested in it
    it can be radio (never played with them yet, but i could get modules if theres enough interest, learn it and use it
    it can be bluetooth (id imagine thats 115200 baud max?)

    that would be crazy if we setup multiple wireless slaves, i think bluetooth would be cheaper option, using 2 teensy 3.5 wireless slaves and a t3.6 master, having access to 18 uarts, 9 spi ports, and 10 i2c ports, however with bluetooth over uart protocol, means you loose a uart per slave on the master, so a 3.5/6 can have 6 slaves, however, for each 1 it looses, it gains 5 (so 30 total excluding usb serial). i have not done/test any recursive port access yet nmaster -> slave-> slave, not sure if that will work either (but who knows) so keep this in mind when dealing with multiple wireless slaves, if we can do more than 6, even better, we'll choose the next wireless device capable

  3. #28
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    adding eeprom support for teensy 3.5 slave. I read somewhere on the forum that the T3.6 has issues writing/reading eeprom above 120MHz, the host T3.6@180MHz here is reading the T3.5's (120MHz) eeprom fine, I'm adding more functions support

    teensyEP.read(address); // reads one byte from a specified address
    teensyEP.write(address, value); // writes one byte to a specified address
    teensyEP.update(address, value); // updates the byte at the specified address (only if it's not the same);
    teensyEP.length(); // returns eeprom length

    added Christopher Andrews's eeprom_crc in the slave as well:

    teensyEP.crc(); // returns uint32_t checksum of the eeprom
    Last edited by tonton81; 10-15-2017 at 06:54 PM.

  4. #29
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    PWMServo added to the slave, video attached
    if you look closely, you'll see it doesnt block other code from running (visually by the lcds)

    SERVO.write(pin, value)

    https://www.youtube.com/watch?v=qQolPYsPeWM

    Code:
    actual master code:
      static bool servo_flip;
      static uint32_t servo_timer = millis();
      if ( millis() - servo_timer > 2000 ) {
        servo_timer = millis();
        servo_flip = !servo_flip;
        ( servo_flip ) ? SERVO.write(22, 45) : SERVO.write(22, 120);
      }
    I guess this is also a potential benefit, teensy servo controllers! less work for host, no timers used by host
    this is way better than a PCA9685 :P
    Last edited by tonton81; 10-15-2017 at 11:03 PM.

  5. #30
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Update: remote Fastled support

    FASTLED.show(remote_pin, leds, NUM_LEDS);

    Here is a demo of both 25 and 50 led control on a 144 led strip using Fire2012 demo

    25 led output:
    https://www.youtube.com/watch?v=odnzn59CQ9U

    50 led output:
    https://www.youtube.com/watch?v=cT1kV8HSrI0

    again, the slave is controlling an mcp23017,mcp23s17, analog/digital ports, 2 uart lcds screens, and servo.

    you would have to set your max led count in the slave's CRGB array, you can dynamically write from master a led array of any size of equal or lower and the slave will only run those amounts of leds from the array.

    Update #2, after adding fastled to the slave/master, it wasnt running the attached devices (expanders, blinking led, etc, because i turned those off while adding new functions.
    So here is an updated video of it in action and changing to 60 leds via master..
    https://www.youtube.com/watch?v=uqXatLL1Hbs

    I bet these USB3 ports are taking a beating
    Last edited by tonton81; 10-22-2017 at 09:19 PM.

  6. #31
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Added Watchdog support to the code (code snippet from adafruit sleepydog extracted and preset in startup config, default set at 5 seconds. MCU now supports hot plugability via spi/pwr lines as well as self-recovery.

    hot plugging works instantly when reconnecting, however, on very intermittant connection recoveries, if it will lock up the code of the slave, the watchdog will reset the mcu and the normal run resumes.


    the following video will show normal instant recoveries, and watchdog recovery can be seen near end of video during an actual lockup.
    https://www.youtube.com/watch?v=LZLYEd9WdnM

    added a non blocking led chasing fastled sequence test 144 leds:

    master loop code:
    Code:
      if ( dot_dir ) {
        dot++;
        if ( dot >= NUM_LEDS - 1 ) {
          dot = NUM_LEDS; dot_dir = 0;
        }
        leds[dot] = CRGB::Blue;
        FASTLED.show(23, leds, NUM_LEDS);
        leds[dot] = CRGB::Black;
      }
      if ( !dot_dir ) {
        dot--;
        if ( dot == 0 ) {
          dot = 0; dot_dir = 1;
        }
        leds[dot] = CRGB::Blue;
        FASTLED.show(23, leds, NUM_LEDS);
        leds[dot] = CRGB::Black;
      }
    video: https://www.youtube.com/watch?v=llW59Pand44
    Last edited by tonton81; 10-22-2017 at 11:56 PM.

  7. #32
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    NEW FROM SCRATCH! I2C VERSION (not old lib, brand new, works on teensy at 120MHz!) includes all of the features of the SPI version!
    SPI access // begin,begintransaction(mhz, MSB/LSBFIRST, SPI_MODE(x)), endTransaction, transfer/transfer16
    I2C access // begin, begintransmission, endtransmission, write, read, peek
    EEPROM // read,write,available,crc, length
    FASTLED // show(pin, array, NUM_LEDS);
    UART // begin(baud), read/write/peek/available
    SERVO // write(pin, 0-180)

    in I2C mode, you have access to the 3 SPI busses, and 2 Wire ports T3.5/T3.6
    in SPI mode, you have access to 2 SPI busses, and 3 Wire ports (T3.5)/4 with T3.6

    keep in mind, the SPI version is WAY faster as can be demonstrated by lcd/fastled! attached video of everything in action, just like the old spi video i made, but now on i2c.
    In i2c mode, one of the great advantages is remote access over 2 wires! INCLUDING SPI! the SPEED is not great (KHZ LOL) but for transferring data to peripherals it works well, at least in the case of the MCP23S17 which helped out on the progress of the lib.
    Watchdog has been implemented for the I2C version, and works pretty well. In a day or 2 when im done testing the I2C version, I plan to combine them into one H/CPP file, the Slave already supports both slave SPI/I2C, i've integrated the code and setup a const bool to switch from one or the other.

    Also good to know, is when you mess with the current SPI/I2C pins/calls to change their config, which will block access, the watchdog will reboot it within 10 seconds to restore it's functionality, because the MASTER must run x.events(); in loop to kick the dog which is CRC verified by the slave.

    I2C version:
    https://www.youtube.com/watch?v=eZ87QCAoBN4

    SPI version:
    https://www.youtube.com/watch?v=llW59Pand44
    btw, if your wondering how i did 144 leds using a small wire buffer limit, its just a code technique, i sent the rgb values of each led, per trasmission. it's pretty clean the i2c code, much more so than the SPI version, not complex. But for speed! SPI is best !!!

    here we will demonstrate hotplug and watchdog resets for missing CRC packets (not connected)
    https://www.youtube.com/watch?v=zZF8dOS16Ko

    I also have new commands
    bool x.online() specified whether the slave is connected
    x.events() keeps watchdog happy, if you read it as well, you will see online status and (if any) reset flag in 2 of the 16 bits. During sync/recovery, the reset bit is sent once then unset when calling watchdog, so if you need to sync code you can do something simple like:
    Code:
    uint16_t event = my_SPI_port.events();
    void loop() {
    if (event != 0xFEFF && ((event >> 14)  & 0x01) ) { // if not physically disconnected & reset flag is returned
    init_code();
    }
    }
    
    
    void init_code() {
    //run your init code here to sync settings
    }
    if i had time to play with details, i'd work on the handlers maybe, but wanna get the peripherals on the priority list.


    Paul, I noticed a strange issue with the I2C Wire library thats not seen using i2c_t3

    Here is the onreceive capture log of the packets comming in, ignore the PASS/FAIL statements, some functions use CRC, some don't. They are just for debugging purpose.
    The bytes are more interesting to look at, and, for _some_ transfers, can be erratic.

    Here is the Wire.h packet log using onreceive(int howMany)

    Code:
    9 : 3 : 16 : 26 : PASSED
    9 : 3 : 16 : 26 : 26 : FAIL
    9 : 4 : 8 : 5 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 3 : 16 : 26 : 26 : FAIL
    9 : 4 : 12 : 1 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 3 : 16 : 26 : 26 : FAIL
    9 : 4 : 16 : 29 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 3 : 16 : 26 : 26 : FAIL
    9 : 0 : 23 : 1 : 31 : PASSED
    4 : 1 : 23 : 0 : 165 : 183 : PASSED
    9 : 0 : 13 : 1 : 5 : PASSED
    9 : 2 : 13 : FAIL
    9 : 2 : 13 : 13 : FAIL
    9 : 1 : 13 : 1 : 4 : PASSED
    Here is the i2c_t3.h packet log using onreceive(size_t howMany)

    Code:
    9 : 3 : 16 : 26 : PASSED
    9 : 4 : 8 : 5 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 4 : 12 : 1 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 4 : 16 : 29 : PASSED
    9 : 3 : 16 : 26 : PASSED
    9 : 0 : 23 : 1 : 31 : PASSED
    4 : 1 : 23 : 0 : 165 : 183 : PASSED
    9 : 0 : 13 : 1 : 5 : PASSED
    9 : 2 : 13 : FAIL
    9 : 1 : 13 : 0 : 5 : PASSED
    looks to me like the isr in Wire is duplicating packets with double byte at end, however, functions excellent using i2c_t3, which rules it out as a sketch problem.
    For one thing, when that happens, it triggers the code twice, and if your doing 2-way spi data for example, there goes another injection in the stream while receiving a second byte to corrupt data flow
    After I saw this duplication error and tested the slave using i2c_t3, things were more stable
    Last edited by tonton81; 10-26-2017 at 09:25 PM.

  8. #33
    Senior Member
    Join Date
    Mar 2013
    Location
    Austin TX
    Posts
    411
    Quote Originally Posted by tonton81 View Post
    Code:
    9 : 2 : 13 : FAIL
    9 : 2 : 13 : 13 : FAIL
    looks to me like the isr in Wire is duplicating packets with double byte at end, however, functions excellent using i2c_t3, which rules it out as a sketch problem.
    For one thing, when that happens, it triggers the code twice, and if your doing 2-way spi data for example, there goes another injection in the stream while receiving a second byte to corrupt data flow
    After I saw this duplication error and tested the slave using i2c_t3, things were more stable
    A couple FYI's -

    1) I ran into a similar bug on earlier i2c_t3 code, which is now fixed. This is caused by the STOP interrupt code, which probably needs fixing on Wire. IIRC, the interrupt triggers on the last byte, and then again on the STOP condition, which causes it to double count the last byte (something like that). It means the ISR Slave code that handles STARTF/STOPF/SSIE needs rework (it affects LC/3.5/3.6 devices).

    2) I just put a new i2c_t3 (v10.0) on GitHub and the forum, which includes an error tracker internally (refer to getErrorCount() function, also the basic_master_callback example code). If you do have bus errors it will record them, which may help in long term testing. There is also an onError() master-side callback which can be used to trigger on error conditions.

  9. #34
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    yes thank you nox i did the tests above using ur github copy with the last post, although i havnt tested the errors, the data/functions seem intact and stable

  10. #35
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    In addition to the I2C & SPI version, I'm currently working on a more interesting control idea!
    WIRELESS TEENSIES!!!!!!!
    I plan to integrate all the current features of the I2C/SPI versions

    Here is a demo of blinking the teensy led via a web url, ESP as the host, using the SPI controller lib over HSPI, which controls the T3.5 slave
    Video: https://www.youtube.com/watch?v=Fd63Rs7dx08

    I have NOT decided yet which protocol I should use for transmission, if anyone has any good pointers as there will be several streams of bytes passing through, be it TCP, UDP, HTTP... I'm still NEW to ESP8266 so I need to figure out the best methods for the code implementation...
    I currently use a test HTTP url to access the ESP, and the ESP uses the SPI controller code to control the T3.5 on it's HSPI port. So the latency will be SPI speed & WIFI speed/latency, it should be pretty fast, and this is really good as
    we would be able to control our teensies anywhere in the world !

    I will be testing different protocol methods but looking for best method to stream the bytes over the ESP wifi network.

    Think of it this way.
    One main teensy, and a swarm of slaves, controlled via a single sketch. Possibly even have a 2nd master control the same slave is a possibility, or even from a webpage/phone app... <-- but those are not my field, you guys will design ideas like that :P

    i highly doubt i will run the master lib off the ESP and communicate in between to a new ESP passive script, my idea of implementation is passive SPI transfers over the ESP's, hopefully i only need to write one ESP sketch that will work on all ESP's used in the master/slave teensy setup, and hopefully a SPI ESP8266 addon breakout will be made to compliment the teensy controller
    Last edited by tonton81; 10-30-2017 at 02:12 PM.

  11. #36
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Welp, an update for everyone

    ESP's HSPI nightmare of command queues and half duplex transmissions, amongst unstable HSPI traffic, I decided to ditch the SPI idea in favor of UART to ESP.
    This is NO easy task to go from one MCU to ANOTHER, to ANOTHER, to ANOTHER, but, there IS progress:

    Code:
    S: 128 85 6 0 
    6549 220
    S: 128 85 6 0 
    6560 220
    S: 128 85 6 0 
    6574 220
    S: 128 85 6 0 
    6592 220
    S: 128 85 6 0 
    6604 220
    S: 128 85 6 0 
    6620 220
    S: 128 85 6 0 
    6635 220
    S: 128 85 6 0 
    6647 220
    S: 128 85 6 0 
    6661 220
    S: 128 85 6 0 
    6674 220
    S: 128 85 6 0 
    6688 220
    S: 128 85 6 0 
    6702 220
    S: 128 85 6 0 
    6716 220
    S: 128 85 6 0 
    6729 220
    S: 128 85 6 0 
    6748 220
    S: 128 85 6 0 
    6760 220
    S: 128 85 6 0 
    6773 220
    S: 128 85 6 0 
    6787 220
    S: 128 85 6 0 
    6801 220
    S: 128 85 6 0 
    6814 220
    S: 128 85 6 0 
    6828 220
    S: 128 85 6 0 
    6844 220
    S: 128 85 6 0 
    6856 220
    S: 128 85 6 0 
    6869 220
    S: 128 85 6 0 
    6883 220
    S: 128 85 6 0 
    6898 220
    S: 128 85 6 0 
    6914 220
    S: 128 85 6 0 
    6926 220
    S: 128 85 6 0 
    6940 220
    S: 128 85 6 0 
    6956 220
    S: 128 85 6 0 
    6968 220
    S: 128 85 6 0 
    6982 220
    S: 128 85 6 0 
    6997 220
    S: 128 85 6 0 
    7009 220
    S: 128 85 6 0 
    7025 220
    S: 128 85 6 0 
    7036 220
    S: 128 85 6 0 
    7051 220
    S: 128 85 6 0 
    7065 220
    S: 128 85 6 0 
    7078 220
    S: 128 85 6 0 
    7091 220
    S: 128 85 6 0 
    7105 220
    S: 128 85 6 0 
    7123 220
    S: 128 85 6 0 
    7141 220
    S: 128 85 6 0 
    7157 220
    S: 128 85 6 0 
    7169 220
    S: 128 85 6 0 
    7187 220
    S: 128 85 6 0 
    7199 220
    S: 128 85 6 0 
    7215 220
    S: 128 85 6 0 
    7227 220
    S: 128 85 6 0 
    7244 220
    S: 128 85 6 0 
    7255 220
    S: 128 85 6 0 
    7269 220
    S: 128 85 6 0 
    7283 220
    S: 128 85 6 0 
    7296 220
    S: 128 85 6 0 
    7313 220
    S: 128 85 6 0 
    7326 220
    S: 128 85 6 0 
    7339 220
    S: 128 85 6 0 
    7357 220
    S: 128 85 6 0 
    7368 220
    S: 128 85 6 0 
    7387 220
    S: 128 85 6 0 
    7398 220
    S: 128 85 6 0 
    7412 220
    S: 128 85 6 0 
    7446 220
    S: 128 85 6 0 
    7458 220
    S: 128 85 6 0 
    7472 220
    S: 128 85 6 0 
    7485 220
    S: 128 85 6 0 
    7499 220
    S: 128 85 6 0 
    7513 220
    S: 128 85 6 0 
    7526 220
    S: 128 85 6 0 
    7540 220
    S: 128 85 6 0 
    7554 220
    S: 128 85 6 0 
    7573 220
    S: 128 85 6 0 
    7584 220
    S: 128 85 6 0 
    7598 220
    S: 128 85 6 0 
    7612 220
    S: 128 85 6 0 
    7626 220
    S: 128 85 6 0 
    7639 220
    S: 128 85 6 0 
    7653 220
    S: 128 85 6 0 
    7672 220
    S: 128 85 6 0 
    7683 220
    S: 128 85 6 0 
    7697 220
    S: 128 85 6 0 
    7711 220
    S: 128 85 6 0 
    7724 220
    S: 128 85 6 0 
    7738 220
    S: 128 85 6 0 
    7755 220
    S: 128 85 6 0 
    7772 220
    S: 128 85 6 0 
    7812 220
    S: 128 85 6 0 
    7824 220
    S: 128 85 6 0 
    7840 220
    S: 128 85 6 0 
    7852 220
    S: 128 85 6 0 
    7867 220
    S: 128 85 6 0 
    7880 220
    S: 128 85 6 0 
    7893 220
    S: 128 85 6 0 
    7907 220
    S: 128 85 6 0 
    7920 220
    S: 128 85 6 0 
    7938 220
    S: 128 85 6 0 
    7950 220
    S: 128 85 6 0 
    7964 220
    S: 128 85 6 0 
    7978 220
    S: 128 85 6 0 
    7991 220
    S: 128 85 6 0 
    8004 220
    S: 128 85 6 0 
    8018 220
    S: 128 85 6 0 
    8032 220
    S: 128 85 6 0 
    8046 220
    S: 128 85 6 0 
    8059 220
    S: 128 85 6 0 
    8073 220
    S: 128 85 6 0 
    8087 220
    S: 128 85 6 0 
    8100 220
    S: 128 85 6 0 
    8114 220
    S: 128 85 6 0 
    8130 220
    S: 128 85 6 0 
    8142 220
    S: 128 85 6 0 
    8156 220
    S: 128 85 6 0 
    8169 220
    S: 128 85 6 0 
    8205 220
    S: 128 85 6 0 
    8219 220
    S: 128 85 6 0 
    8232 220
    S: 128 85 6 0 
    8246 220
    S: 128 85 6 0 
    8260 220
    S: 128 85 6 0 
    8272 220
    S: 128 85 6 0 
    8286 220
    S: 128 85 6 0 
    8300 220
    S: 128 85 6 0 
    8313 220
    S: 128 85 6 0 
    8327 220
    S: 128 85 6 0 
    8341 220
    S: 128 85 6 0 
    8354 220
    S: 128 85 6 0 
    8368 220
    S: 128 85 6 0 
    8383 220
    S: 128 85 6 0 
    8396 220
    S: 128 85 6 0 
    8409 220
    S: 128 85 6 0 
    8423 220
    S: 128 85 6 0 
    8437 220
    S: 128 85 6 0 
    8450 220
    S: 128 85 6 0 
    8464 220
    S: 128 85 6 0 
    8478 220
    S: 128 85 6 0 
    8492 220
    S: 128 85 6 0 
    8505 220
    S: 128 85 6 0 
    8519 220
    S: 128 85 6 0 
    8535 220
    S: 128 85 6 0 
    8546 220
    S: 128 85 6 0 
    8560 220
    S: 128 85 6 0 
    8584 220
    S: 128 85 6 0 
    8603 220
    S: 128 85 6 0 
    8617 220
    S: 128 85 6 0 
    8631 220
    S: 128 85 6 0 
    8643 220
    S: 128 85 6 0 
    8657 220
    S: 128 85 6 0 
    8670 220
    S: 128 85 6 0 
    8684 220
    S: 128 85 6 0 
    8698 220
    S: 128 85 6 0 
    8711 220
    S: 128 85 6 0 
    8725 220
    S: 128 85 6 0 
    8739 220
    S: 128 85 6 0 
    8752 220
    S: 128 85 6 0 
    8766 220
    S: 128 85 6 0 
    8780 220
    S: 128 85 6 0 
    8794 220
    S: 128 85 6 0 
    8807 220
    S: 128 85 6 0 
    8821 220
    S: 128 85 6 0 
    8835 220
    S: 128 85 6 0 
    8849 220
    S: 128 85 6 0 
    8864 220
    S: 128 85 6 0 
    8876 220
    S: 128 85 6 0 
    8893 220
    S: 128 85 6 0 
    8904 220
    S: 128 85 6 0 
    8918 220
    S: 128 85 6 0 
    8932 220
    S: 128 85 6 0 
    8945 220
    S: 128 85 6 0 
    8959 220
    S: 128 85 6 0 
    8973 220
    S: 128 85 6 0 
    8987 220
    S: 128 85 6 0 
    9000 220
    S: 128 85 6 0 
    9014 220
    S: 128 85 6 0 
    9028 220
    S: 128 85 6 0 
    9041 220
    S: 128 85 6 0 
    9055 220
    S: 128 85 6 0 
    9069 220
    S: 128 85 6 0 
    9082 220
    S: 128 85 6 0 
    9096 220
    S: 128 85 6 0 
    9110 220
    S: 128 85 6 0 
    9124 220
    S: 128 85 6 0 
    9137 220
    S: 128 85 6 0 
    9151 220
    S: 128 85 6 0 
    9165 220
    S: 128 85 6 0 
    9178 220
    S: 128 85 6 0 
    9192 220
    S: 128 85 6 0 
    9206 220
    S: 128 85 6 0 
    9220 220
    S: 128 85 6 0 
    9233 220
    S: 128 85 6 0 
    9247 220
    S: 128 85 6 0 
    9261 220
    S: 128 85 6 0 
    9274 220
    S: 128 85 6 0 
    9288 220
    S: 128 85 6 0 
    9302 220
    S: 128 85 6 0 
    9315 220
    S: 128 85 6 0 
    9329 220
    S: 128 85 6 0 
    9343 220
    S: 128 85 6 0 
    9357 220
    S: 128 85 6 0 
    9370 220
    S: 128 85 6 0 
    9384 220
    S: 128 85 6 0 
    9399 220
    S: 128 85 6 0 
    9411 220
    S: 128 85 6 0 
    9427 220
    S: 128 85 6 0 
    9439 220
    S: 128 85 6 0 
    9453 220
    S: 128 85 6 0 
    9466 220
    S: 128 85 6 0 
    9480 220
    S: 128 85 6 0 
    9494 220
    S: 128 85 6 0 
    9508 220
    S: 128 85 6 0 
    9523 220
    S: 128 85 6 0 
    9535 220
    S: 128 85 6 0 
    9548 220
    S: 128 85 6 0 
    9562 220
    S: 128 85 6 0 
    9577 220
    S: 128 85 6 0 
    9590 220
    S: 128 85 6 0 
    9603 220
    S: 128 85 6 0 
    9621 220
    S: 128 85 6 0 
    9633 220
    S: 128 85 6 0 
    9646 220
    S: 128 85 6 0 
    9673 220
    S: 128 85 6 0 
    9685 220
    S: 128 85 6 0 
    9702 220
    S: 128 85 6 0 
    9714 220
    S: 128 85 6 0 
    9731 220
    S: 128 85 6 0 
    9743 220
    S: 128 85 6 0 
    9756 220
    S: 128 85 6 0 
    9775 220
    S: 128 85 6 0 
    9786 220
    S: 128 85 6 0 
    9800 220
    S: 128 85 6 0 
    9814 220
    S: 128 85 6 0 
    9830 220
    S: 128 85 6 0 
    9841 220
    S: 128 85 6 0 
    9855 220
    S: 128 85 6 0 
    9869 220
    S: 128 85 6 0 
    9885 220
    S: 128 85 6 0 
    9899 220
    S: 128 85 6 0 
    9912 220
    S: 128 85 6 0 
    9930 220
    S: 128 85 6 0 
    9941 220
    S: 128 85 6 0 
    9955 220
    S: 128 85 6 0 
    9970 220
    S: 128 85 6 0 
    9982 220
    S: 128 85 6 0 
    9996 220
    S: 128 85 6 0 
    10010 220
    S: 128 85 6 0 
    10023 220
    S: 128 85 6 0 
    10037 220
    S: 128 85 6 0 
    10051 220
    S: 128 85 6 0 
    10065 220
    S: 128 85 6 0 
    10078 220
    S: 128 85 6 0 
    10092 220
    S: 128 85 6 0 
    10106 220
    S: 128 85 6 0 
    10119 220
    S: 128 85 6 0 
    10133 220
    S: 128 85 6 0 
    10147 220
    S: 128 85 6 0 
    10160 220
    S: 128 85 6 0 
    10174 220
    S: 128 85 6 0 
    10188 220
    S: 128 85 6 0 
    10202 220
    S: 128 85 6 0 
    10216 220
    S: 128 85 6 0 
    10229 220
    S: 128 85 6 0 
    10243 220
    S: 128 85 6 0 
    10256 220
    S: 128 85 6 0 
    10270 220
    S: 128 85 6 0 
    10284 220
    S: 128 85 6 0 
    10298 220
    S: 128 85 6 0 
    10311 220
    S: 128 85 6 0 
    10329 220
    S: 128 85 6 0 
    10341 220
    S: 128 85 6 0 
    10361 220
    S: 128 85 6 0 
    10376 220
    S: 128 85 6 0 
    10388 220
    S: 128 85 6 0 
    10402 220
    S: 128 85 6 0 
    10415 220
    S: 128 85 6 0 
    10429 220
    S: 128 85 6 0 
    10444 220
    S: 128 85 6 0 
    10457 220
    S: 128 85 6 0 
    10470 220
    S: 128 85 6 0 
    10484 220
    S: 128 85 6 0 
    10499 220
    S: 128 85 6 0 
    10511 220
    S: 128 85 6 0 
    10525 220
    S: 128 85 6 0 
    10546 220
    S: 128 85 6 0 
    10559 220
    S: 128 85 6 0 
    10571 220
    S: 128 85 6 0 
    10587 220
    S: 128 85 6 0 
    10615 220
    S: 128 85 6 0 
    10632 220
    S: 128 85 6 0 
    10644 220
    S: 128 85 6 0 
    10660 220
    S: 128 85 6 0 
    10674 220
    S: 128 85 6 0 
    10687 220
    S: 128 85 6 0 
    10699 220
    S: 128 85 6 0 
    10713 220
    S: 128 85 6 0 
    10728 220
    S: 128 85 6 0 
    10740 220
    S: 128 85 6 0 
    10754 220
    S: 128 85 6 0 
    10768 220
    S: 128 85 6 0 
    10782 220
    S: 128 85 6 0 
    10795 220
    S: 128 85 6 0 
    10809 220
    S: 128 85 6 0 
    10823 220
    S: 128 85 6 0 
    10838 220
    S: 128 85 6 0 
    10850 220
    S: 128 85 6 0 
    10864 220
    S: 128 85 6 0 
    10878 220
    S: 128 85 6 0 
    10891 220
    S: 128 85 6 0 
    10905 220
    S: 128 85 6 0 
    10919 220
    S: 128 85 6 0 
    10932 220
    S: 128 85 6 0 
    10946 220
    S: 128 85 6 0 
    10960 220
    S: 128 85 6 0 
    10973 220
    S: 128 85 6 0 
    10987 220
    S: 128 85 6 0 
    11001 220
    S: 128 85 6 0 
    11015 220
    S: 128 85 6 0 
    11065 220
    S: 128 85 6 0 
    11077 220
    S: 128 85 6 0 
    11091 220
    S: 128 85 6 0 
    11104 220
    S: 128 85 6 0 
    11118 220
    S: 128 85 6 0 
    11132 220
    S: 128 85 6 0 
    11146 220
    S: 128 85 6 0 
    11159 220
    S: 128 85 6 0 
    11173 220
    S: 128 85 6 0 
    11186 220
    S: 128 85 6 0 
    11200 220
    S: 128 85 6 0 
    11220 220
    S: 128 85 6 0 
    11234 220
    S: 128 85 6 0 
    11247 220
    S: 128 85 6 0 
    11259 220
    S: 128 85 6 0 
    11275 220
    S: 128 85 6 0 
    11286 220
    S: 128 85 6 0 
    11301 220
    S: 128 85 6 0 
    11314 220
    S: 128 85 6 0 
    11328 220
    S: 128 85 6 0 
    11341 220
    S: 128 85 6 0 
    11355 220
    S: 128 85 6 0 
    11369 220
    S: 128 85 6 0 
    11382 220
    S: 128 85 6 0 
    11396 220
    S: 128 85 6 0 
    11410 220
    S: 128 85 6 0 
    11423 220
    S: 128 85 6 0 
    11437 220
    S: 128 85 6 0 
    11451 220
    S: 128 85 6 0 
    11465 220
    S: 128 85 6 0 
    11478 220
    S: 128 85 6 0 
    11492 220
    S: 128 85 6 0 
    11506 220
    S: 128 85 6 0 
    11519 220
    S: 128 85 6 0 
    11533 220
    S: 128 85 6 0 
    11557 220
    S: 128 85 6 0 
    11569 220
    S: 128 85 6 0 
    11582 220
    S: 128 85 6 0 
    11596 220
    S: 128 85 6 0 
    11610 220
    S: 128 85 6 0 
    11624 220
    S: 128 85 6 0 
    11637 220
    S: 128 85 6 0 
    11651 220
    S: 128 85 6 0 
    11665 220
    S: 128 85 6 0 
    11678 220
    S: 128 85 6 0 
    11692 220
    S: 128 85 6 0 
    11706 220
    S: 128 85 6 0 
    11720 220
    S: 128 85 6 0 
    11733 220
    S: 128 85 6 0 
    11747 220
    S: 128 85 6 0 
    11760 220
    S: 128 85 6 0 
    11774 220
    S: 128 85 6 0 
    11791 220
    S: 128 85 6 0 
    11802 220
    S: 128 85 6 0 
    11816 220
    S: 128 85 6 0 
    11830 220
    S: 128 85 6 0 
    11844 220
    S: 128 85 6 0 
    11857 220
    S: 128 85 6 0 
    11871 220
    S: 128 85 6 0 
    11885 220
    S: 128 85 6 0 
    11898 220
    S: 128 85 6 0 
    11912 220
    S: 128 85 6 0 
    11926 220
    S: 128 85 6 0 
    11940 220
    S: 128 85 6 0 
    11954 220
    S: 128 85 6 0 
    11967 220
    S: 128 85 6 0 
    11983 220
    S: 128 85 6 0 
    11995 220
    S: 128 85 6 0 
    12009 220
    S: 128 85 6 0 
    12027 220
    S: 128 85 6 0 
    12038 220
    S: 128 85 6 0 
    12052 220
    S: 128 85 6 0 
    12066 220
    S: 128 85 6 0 
    12079 220
    S: 128 85 6 0 
    12093 220
    S: 128 85 6 0 
    12107 220
    S: 128 85 6 0 
    12121 220
    S: 128 85 6 0 
    12134 220
    S: 128 85 6 0 
    12148 220
    S: 128 85 6 0 
    12163 220
    S: 128 85 6 0 
    12175 220
    S: 128 85 6 0 
    12189 220
    S: 128 85 6 0 
    12203 220
    S: 128 85 6 0 
    12217 220
    S: 128 85 6 0 
    12230 220
    S: 128 85 6 0 
    12244 220
    S: 128 85 6 0 
    12258 220
    S: 128 85 6 0 
    12271 220
    S: 128 85 6 0 
    12305 220
    S: 128 85 6 0 
    12318 220
    S: 128 85 6 0 
    12331 220
    S: 128 85 6 0 
    12344 220
    S: 128 85 6 0 
    12358 220
    S: 128 85 6 0 
    12372 220
    S: 128 85 6 0 
    12386 220
    S: 128 85 6 0 
    12399 220
    S: 128 85 6 0 
    12414 220
    S: 128 85 6 0 
    12439 220
    S: 128 85 6 0 
    12453 220
    S: 128 85 6 0 
    12464 220
    S: 128 85 6 0 
    12479 220
    S: 128 85 6 0 
    12492 220
    S: 128 85 6 0 
    12511 220
    S: 128 85 6 0 
    12527 220
    S: 128 85 6 0 
    12571 220
    S: 128 85 6 0 
    12587 220
    S: 128 85 6 0 
    12598 220
    S: 128 85 6 0 
    12612 220
    S: 128 85 6 0 
    12626 220
    S: 128 85 6 0 
    12639 220
    S: 128 85 6 0 
    12653 220
    S: 128 85 6 0 
    12671 220
    S: 128 85 6 0 
    12687 220
    S: 128 85 6 0 
    12698 220
    S: 128 85 6 0 
    12712 220
    S: 128 85 6 0 
    12732 220
    S: 128 85 6 0 
    12743 220
    S: 128 85 6 0 
    12757 220
    S: 128 85 6 0 
    12771 220
    S: 128 85 6 0 
    12787 220
    S: 128 85 6 0 
    12798 220
    S: 128 85 6 0 
    12812 220
    S: 128 85 6 0 
    12828 220
    S: 128 85 6 0 
    12840 220
    S: 128 85 6 0 
    12853 220
    S: 128 85 6 0 
    12867 220
    S: 128 85 6 0 
    12881 220
    S: 128 85 6 0 
    12894 220
    S: 128 85 6 0 
    12908 220
    S: 128 85 6 0 
    12922 220
    S: 128 85 6 0 
    12936 220
    S: 128 85 6 0 
    12952 220
    S: 128 85 6 0 
    12964 220
    S: 128 85 6 0 
    12978 220
    S: 128 85 6 0 
    12994 220
    S: 128 85 6 0 
    13007 220
    S: 128 85 6 0 
    13019 220
    S: 128 85 6 0 
    13035 220
    S: 128 85 6 0 
    13046 220
    S: 128 85 6 0 
    13060 220
    S: 128 85 6 0 
    13074 220
    S: 128 85 6 0 
    13087 220
    S: 128 85 6 0 
    13101 220
    S: 128 85 6 0 
    13115 220
    S: 128 85 6 0 
    13129 220
    S: 128 85 6 0 
    13142 220
    S: 128 85 6 0 
    13156 220
    S: 128 85 6 0 
    13170 220
    S: 128 85 6 0 
    13187 220
    S: 128 85 6 0 
    13199 220
    S: 128 85 6 0 
    13212 220
    S: 128 85 6 0 
    13226 220
    S: 128 85 6 0 
    13240 220
    S: 128 85 6 0 
    13253 220
    S: 128 85 6 0 
    13267 220
    S: 128 85 6 0 
    13281 220
    S: 128 85 6 0 
    13296 220
    S: 128 85 6 0 
    13308 220
    S: 128 85 6 0 
    13322 220
    S: 128 85 6 0 
    13336 220
    S: 128 85 6 0 
    13349 220
    S: 128 85 6 0 
    13363 220
    S: 128 85 6 0 
    13377 220
    S: 128 85 6 0 
    13397 220
    S: 128 85 6 0 
    13409 220
    S: 128 85 6 0 
    13436 220
    S: 128 85 6 0 
    13450 220
    S: 128 85 6 0 
    13462 220
    S: 128 85 6 0 
    13475 220
    S: 128 85 6 0 
    13489 220
    S: 128 85 6 0 
    13509 220
    S: 128 85 6 0 
    13523 220
    S: 128 85 6 0 
    13551 220
    S: 128 85 6 0 
    13563 220
    S: 128 85 6 0 
    13576 220
    S: 128 85 6 0 
    13590 220
    S: 128 85 6 0 
    13604 220
    S: 128 85 6 0 
    13617 220
    S: 128 85 6 0 
    13631 220
    S: 128 85 6 0 
    13645 220
    S: 128 85 6 0 
    13659 220
    S: 128 85 6 0 
    13672 220
    S: 128 85 6 0 
    13686 220
    S: 128 85 6 0 
    13700 220
    S: 128 85 6 0 
    13713 220
    S: 128 85 6 0 
    13727 220
    S: 128 85 6 0 
    13741 220
    S: 128 85 6 0 
    13754 220
    S: 128 85 6 0 
    13768 220
    S: 128 85 6 0 
    13782 220
    S: 128 85 6 0 
    13798 220
    S: 128 85 6 0 
    13811 220
    S: 128 85 6 0 
    13824 220
    S: 128 85 6 0 
    13839 220
    S: 128 85 6 0 
    13886 220
    S: 128 85 6 0 
    13910 220
    S: 128 85 6 0 
    13924 220
    S: 128 85 6 0 
    13941 220
    S: 128 85 6 0 
    13953 220
    S: 128 85 6 0 
    13976 220
    S: 128 85 6 0 
    13988 220
    S: 128 85 6 0 
    14002 220
    S: 128 85 6 0 
    14018 220
    S: 128 85 6 0 
    14033 220
    S: 128 85 6 0 
    14044 220
    S: 128 85 6 0 
    14071 220
    S: 128 85 6 0 
    14091 220
    S: 128 85 6 0 
    14110 220
    S: 128 85 6 0 
    14121 220
    S: 128 85 6 0 
    14135 220
    S: 128 85 6 0 
    14149 220
    S: 128 85 6 0 
    14162 220
    S: 128 85 6 0 
    14176 220
    S: 128 85 6 0 
    14190 220
    S: 128 85 6 0 
    14204 220
    S: 128 85 6 0 
    14217 220
    S: 128 85 6 0 
    14231 220
    S: 128 85 6 0 
    14247 220
    S: 128 85 6 0 
    14259 220
    S: 128 85 6 0 
    14272 220
    S: 128 85 6 0 
    14287 220
    S: 128 85 6 0 
    14300 220
    S: 128 85 6 0 
    14313 220
    S: 128 85 6 0 
    14327 220
    S: 128 85 6 0 
    14341 220
    S: 128 85 6 0 
    14354 220
    S: 128 85 6 0 
    14368 220
    S: 128 85 6 0 
    14382 220
    S: 128 85 6 0 
    14396 220
    S: 128 85 6 0 
    14409 220
    S: 128 85 6 0 
    14425 220
    S: 128 85 6 0 
    14439 220
    S: 128 85 6 0 
    14451 220
    S: 128 85 6 0 
    14464 220
    S: 128 85 6 0 
    14478 220
    S: 128 85 6 0 
    14492 220
    S: 128 85 6 0 
    14505 220
    S: 128 85 6 0 
    14519 220
    S: 128 85 6 0 
    14533 220
    S: 128 85 6 0 
    14546 220
    S: 128 85 6 0 
    14560 220
    S: 128 85 6 0 
    14574 220
    S: 128 85 6 0 
    14587 220
    S: 128 85 6 0 
    14601 220
    S: 128 85 6 0 
    14616 220
    S: 128 85 6 0 
    14629 220
    S: 128 85 6 0 
    14642 220
    S: 128 85 6 0 
    14657 220
    S: 128 85 6 0 
    14671 220
    S: 128 85 6 0 
    14683 220
    S: 128 85 6 0 
    14697 220
    S: 128 85 6 0 
    14711 220
    S: 128 85 6 0 
    14725 220
    S: 128 85 6 0 
    14739 220
    S: 128 85 6 0 
    14753 220
    S: 128 85 6 0 
    14767 220
    S: 128 85 6 0 
    14781 220
    S: 128 85 6 0 
    14816 220
    S: 128 85 6 0 
    14832 220
    S: 128 85 6 0 
    14844 220
    S: 128 85 6 0 
    14857 220
    S: 128 85 6 0 
    14871 220
    S: 128 85 6 0 
    14885 220
    S: 128 85 6 0 
    14899 220
    S: 128 85 6 0 
    14912 220
    S: 128 85 6 0 
    14927 220
    S: 128 85 6 0 
    14942 220
    S: 128 85 6 0 
    14954 220
    S: 128 85 6 0 
    14967 220
    S: 128 85 6 0 
    14981 220
    S: 128 85 6 0 
    14995 220
    S: 128 85 6 0 
    15010 220
    S: 128 85 6 0 
    15022 220
    S: 128 85 6 0 
    15036 220
    S: 128 85 6 0 
    15049 220
    S: 128 85 6 0 
    15067 220
    S: 128 85 6 0 
    15078 220
    S: 128 85 6 0 
    15094 220
    S: 128 85 6 0 
    15106 220
    S: 128 85 6 0 
    15120 220
    S: 128 85 6 0 
    15133 220
    S: 128 85 6 0 
    15147 220
    S: 128 85 6 0 
    15161 220
    S: 128 85 6 0 
    15174 220
    S: 128 85 6 0 
    15188 220
    S: 128 85 6 0 
    15202 220
    S: 128 85 6 0 
    15215 220
    S: 128 85 6 0 
    15229 220
    S: 128 85 6 0 
    15245 220
    S: 128 85 6 0 
    15257 220
    S: 128 85 6 0 
    15270 220
    S: 128 85 6 0 
    15284 220
    S: 128 85 6 0 
    15298 220
    S: 128 85 6 0 
    15311 220
    S: 128 85 6 0 
    15325 220
    S: 128 85 6 0 
    15339 220
    S: 128 85 6 0 
    15353 220
    S: 128 85 6 0 
    15366 220
    S: 128 85 6 0 
    15380 220
    S: 128 85 6 0 
    15394 220
    S: 128 85 6 0 
    15407 220
    S: 128 85 6 0 
    15421 220
    S: 128 85 6 0 
    15435 220
    S: 128 85 6 0 
    15449 220
    S: 128 85 6 0 
    15462 220
    S: 128 85 6 0 
    15476 220
    S: 128 85 6 0 
    15490 220
    S: 128 85 6 0 
    15503 220
    S: 128 85 6 0 
    15517 220
    S: 128 85 6 0 
    15531 220
    S: 128 85 6 0 
    15544 220
    S: 128 85 6 0 
    15558 220
    S: 128 85 6 0 
    15572 220
    S: 128 85 6 0 
    15586 220
    S: 128 85 6 0 
    15599 220
    S: 128 85 6 0 
    15618 220
    S: 128 85 6 0 
    15630 220
    S: 128 85 6 0 
    15643 220
    S: 128 85 6 0 
    15657 220
    S: 128 85 6 0 
    15671 220
    S: 128 85 6 0 
    15684 220
    S: 128 85 6 0 
    15701 220
    S: 128 85 6 0 
    15725 220
    S: 128 85 6 0 
    15759 220
    S: 128 85 6 0 
    15770 220
    S: 128 85 6 0 
    15784 220
    S: 128 85 6 0 
    15808 220
    S: 128 85 6 0 
    15826 220
    S: 128 85 6 0 
    15837 220
    S: 128 85 6 0 
    15851 220
    S: 128 85 6 0 
    15895 220
    S: 128 85 6 0 
    15907 220
    S: 128 85 6 0 
    15921 220
    S: 128 85 6 0 
    15934 220
    S: 128 85 6 0 
    15950 220
    S: 128 85 6 0 
    15966 220
    S: 128 85 6 0 
    15980 220
    S: 128 85 6 0 
    15992 220
    S: 128 85 6 0 
    16006 220
    S: 128 85 6 0 
    16019 220
    S: 128 85 6 0 
    16033 220
    S: 128 85 6 0 
    16047 220
    S: 128 85 6 0 
    16060 220
    S: 128 85 6 0 
    16074 220
    S: 128 85 6 0 
    16088 220
    S: 128 85 6 0 
    16101 220
    S: 128 85 6 0 
    16115 220
    S: 128 85 6 0 
    16130 220
    S: 128 85 6 0 
    16143 220
    S: 128 85 6 0 
    16158 220
    S: 128 85 6 0 
    16170 220
    S: 128 85 6 0 
    16184 220
    S: 128 85 6 0 
    16198 220
    S: 128 85 6 0 
    16211 220
    S: 128 85 6 0 
    16225 220
    S: 128 85 6 0 
    16239 220
    S: 128 85 6 0 
    16252 220
    S: 128 85 6 0 
    16266 220
    S: 128 85 6 0 
    16281 220
    S: 128 85 6 0 
    16293 220
    S: 128 85 6 0 
    16307 220
    S: 128 85 6 0 
    16321 220
    S: 128 85 6 0 
    16334 220
    S: 128 85 6 0 
    16348 220
    S: 128 85 6 0 
    16362 220
    S: 128 85 6 0 
    16376 220
    S: 128 85 6 0 
    16389 220
    S: 128 85 6 0 
    16403 220
    S: 128 85 6 0 
    16417 220
    S: 128 85 6 0 
    16430 220
    S: 128 85 6 0 
    16444 220
    S: 128 85 6 0 
    16458 220
    S: 128 85 6 0 
    16472 220
    S: 128 85 6 0 
    16485 220
    S: 128 85 6 0 
    16499 220
    S: 128 85 6 0 
    16513 220
    S: 128 85 6 0 
    16530 220
    S: 128 85 6 0 
    16544 220
    S: 128 85 6 0 
    16556 220
    S: 128 85 6 0 
    16570 220
    S: 128 85 6 0 
    16583 220
    S: 128 85 6 0 
    16597 220
    S: 128 85 6 0 
    16611 220
    S: 128 85 6 0 
    16626 220
    S: 128 85 6 0 
    16639 220
    S: 128 85 6 0 
    16652 220
    S: 128 85 6 0 
    16666 220
    S: 128 85 6 0 
    16679 220
    S: 128 85 6 0 
    16693 220
    S: 128 85 6 0 
    16707 220
    S: 128 85 6 0 
    16725 220
    S: 128 85 6 0 
    16738 220
    S: 128 85 6 0 
    16750 220
    S: 128 85 6 0 
    16764 220
    S: 128 85 6 0 
    16780 220
    S: 128 85 6 0 
    16791 220
    S: 128 85 6 0 
    16805 220
    S: 128 85 6 0 
    16819 220
    S: 128 85 6 0 
    16833 220
    S: 128 85 6 0 
    16846 220
    S: 128 85 6 0 
    16860 220
    S: 128 85 6 0 
    16874 220
    S: 128 85 6 0 
    16890 220
    S: 128 85 6 0 
    16902 220
    S: 128 85 6 0 
    16915 220
    S: 128 85 6 0 
    16931 220
    S: 128 85 6 0 
    16944 220
    S: 128 85 6 0 
    16957 220
    S: 128 85 6 0 
    16971 220
    S: 128 85 6 0 
    16984 220
    S: 128 85 6 0 
    16998 220
    S: 128 85 6 0 
    17011 220
    S: 128 85 6 0 
    17027 220
    S: 128 85 6 0 
    17039 220
    S: 128 85 6 0 
    17053 220
    S: 128 85 6 0 
    17066 220
    S: 128 85 6 0 
    17080 220
    S: 128 85 6 0 
    17094 220
    S: 128 85 6 0 
    17108 220
    S: 128 85 6 0 
    17140 220
    S: 128 85 6 0 
    17151 220
    S: 128 85 6 0 
    17165 220
    S: 128 85 6 0 
    17179 220
    S: 128 85 6 0 
    17193 220
    S: 128 85 6 0 
    17206 220
    S: 128 85 6 0 
    17226 220
    S: 128 85 6 0 
    17245 220
    S: 128 85 6 0 
    17257 220
    S: 128 85 6 0 
    17274 220
    S: 128 85 6 0 
    17289 220
    S: 128 85 6 0 
    17301 220
    S: 128 85 6 0 
    17314 220
    S: 128 85 6 0 
    17330 220
    S: 128 85 6 0 
    17342 220
    S: 128 85 6 0 
    17356 220
    S: 128 85 6 0 
    17369 220
    S: 128 85 6 0 
    17385 220
    S: 128 85 6 0 
    17398 220
    S: 128 85 6 0 
    17412 220
    S: 128 85 6 0 
    17424 220
    S: 128 85 6 0 
    17442 220
    S: 128 85 6 0 
    17453 220
    S: 128 85 6 0 
    17468 220
    S: 128 85 6 0 
    17497 220
    S: 128 85 6 0 
    17510 220
    S: 128 85 6 0 
    17523 220
    S: 128 85 6 0 
    17536 220
    S: 128 85 6 0 
    17550 220
    S: 128 85 6 0 
    17564 220
    S: 128 85 6 0 
    17577 220
    S: 128 85 6 0 
    17591 220
    S: 128 85 6 0 
    17605 220
    S: 128 85 6 0 
    17619 220
    S: 128 85 6 0 
    17641 220
    S: 128 85 6 0 
    17653 220
    S: 128 85 6 0 
    17667 220
    S: 128 85 6 0 
    17688 220
    S: 128 85 6 0 
    17701 220
    S: 128 85 6 0 
    17714 220
    S: 128 85 6 0 
    17730 220
    S: 128 85 6 0 
    17741 220
    S: 128 85 6 0 
    17768 220
    S: 128 85 6 0 
    17780 220
    S: 128 85 6 0 
    17794 220
    S: 128 85 6 0 
    17810 220
    S: 128 85 6 0 
    17822 220
    S: 128 85 6 0 
    17835 220
    S: 128 85 6 0 
    17849 220
    S: 128 85 6 0 
    17862 220
    S: 128 85 6 0 
    17876 220
    S: 128 85 6 0 
    17890 220
    S: 128 85 6 0 
    17906 220
    S: 128 85 6 0 
    17918 220
    S: 128 85 6 0 
    17932 220
    S: 128 85 6 0 
    17945 220
    S: 128 85 6 0 
    17959 220
    S: 128 85 6 0 
    17973 220
    S: 128 85 6 0 
    17986 220
    S: 128 85 6 0 
    18000 220
    S: 128 85 6 0 
    18014 220
    S: 128 85 6 0 
    18028 220
    S: 128 85 6 0 
    18044 220
    S: 128 85 6 0 
    18060 220
    S: 128 85 6 0 
    18072 220
    S: 128 85 6 0 
    18086 220
    S: 128 85 6 0 
    18104 220
    S: 128 85 6 0 
    18116 220
    S: 128 85 6 0 
    18129 220
    S: 128 85 6 0 
    18147 220
    S: 128 85 6 0 
    18159 220
    S: 128 85 6 0 
    18174 220
    S: 128 85 6 0 
    18186 220
    S: 128 85 6 0 
    18200 220
    S: 128 85 6 0 
    18214 220
    S: 128 85 6 0 
    18228 220
    S: 128 85 6 0 
    18241 220
    S: 128 85 6 0 
    18255 220
    S: 128 85 6 0 
    18269 220
    S: 128 85 6 0 
    18282 220
    S: 128 85 6 0 
    18296 220
    S: 128 85 6 0 
    18310 220
    S: 128 85 6 0 
    18323 220
    S: 128 85 6 0 
    18340 220
    S: 128 85 6 0 
    18352 220
    S: 128 85 6 0 
    18365 220
    S: 128 85 6 0 
    18379 220
    S: 128 85 6 0 
    18393 220
    S: 128 85 6 0 
    18407 220
    S: 128 85 6 0 
    18421 220
    S: 128 85 6 0 
    18434 220
    S: 128 85 6 0 
    18449 220
    S: 128 85 6 0 
    18461 220
    S: 128 85 6 0 
    18475 220
    S: 128 85 6 0 
    18495 220
    S: 128 85 6 0 
    18507 220
    S: 128 85 6 0 
    18520 220
    S: 128 85 6 0 
    18534 220
    S: 128 85 6 0 
    18548 220
    S: 128 85 6 0 
    18561 220
    S: 128 85 6 0 
    18575 220
    S: 128 85 6 0 
    18589 220
    S: 128 85 6 0 
    18602 220
    S: 128 85 6 0 
    18620 220
    S: 128 85 6 0 
    18632 220
    S: 128 85 6 0 
    18645 220
    S: 128 85 6 0 
    18659 220
    S: 128 85 6 0 
    18673 220
    S: 128 85 6 0 
    18686 220
    S: 128 85 6 0 
    18700 220
    S: 128 85 6 0 
    18714 220
    S: 128 85 6 0 
    18728 220
    S: 128 85 6 0 
    18741 220
    S: 128 85 6 0 
    18755 220
    S: 128 85 6 0 
    18769 220
    S: 128 85 6 0 
    18782 220
    S: 128 85 6 0 
    18796 220
    S: 128 85 6 0 
    18810 220
    S: 128 85 6 0 
    18824 220
    S: 128 85 6 0 
    18837 220
    S: 128 85 6 0 
    18851 220
    S: 128 85 6 0 
    18865 220
    S: 128 85 6 0 
    18878 220
    S: 128 85 6 0 
    18892 220
    S: 128 85 6 0 
    18906 220
    S: 128 85 6 0 
    18919 220
    S: 128 85 6 0 
    18933 220
    S: 128 85 6 0 
    18950 220
    S: 128 85 6 0 
    18961 220
    S: 128 85 6 0 
    18975 220
    S: 128 85 6 0 
    18989 220
    S: 128 85 6 0 
    19002 220
    S: 128 85 6 0 
    19016 220
    S: 128 85 6 0 
    19030 220
    S: 128 85 6 0 
    19043 220
    S: 128 85 6 0 
    19057 220
    S: 128 85 6 0 
    19071 220
    S: 128 85 6 0 
    19085 220
    S: 128 85 6 0 
    19102 220
    S: 128 85 6 0 
    19113 220
    S: 128 85 6 0 
    19127 220
    S: 128 85 6 0 
    19141 220
    S: 128 85 6 0 
    19154 220
    S: 128 85 6 0 
    19168 220
    S: 128 85 6 0 
    19185 220
    S: 128 85 6 0 
    19196 220
    S: 128 85 6 0 
    19210 220
    S: 128 85 6 0 
    19224 220
    S: 128 85 6 0 
    19239 220
    S: 128 85 6 0 
    19254 220
    S: 128 85 6 0 
    19266 220
    S: 128 85 6 0 
    19279 220
    S: 128 85 6 0 
    19298 220
    S: 128 85 6 0 
    19310 220
    S: 128 85 6 0 
    19323 220
    S: 128 85 6 0 
    19338 220
    S: 128 85 6 0 
    19351 220
    S: 128 85 6 0 
    19365 220
    S: 128 85 6 0 
    19378 220
    S: 128 85 6 0 
    19392 220
    S: 128 85 6 0 
    19405 220
    S: 128 85 6 0 
    19419 220
    S: 128 85 6 0 
    19433 220
    S: 128 85 6 0 
    19447 220
    S: 128 85 6 0 
    19460 220
    S: 128 85 6 0 
    19474 220
    S: 128 85 6 0 
    19488 220
    S: 128 85 6 0 
    19501 220
    S: 128 85 6 0 
    19515 220
    S: 128 85 6 0 
    19533 220
    S: 128 85 6 0 
    19551 220
    S: 128 85 6 0 
    19563 220
    S: 128 85 6 0 
    19576 220
    S: 128 85 6 0 
    19590 220
    S: 128 85 6 0 
    19603 220
    S: 128 85 6 0 
    19617 220
    S: 128 85 6 0 
    19631 220
    S: 128 85 6 0 
    19645 220
    S: 128 85 6 0 
    19658 220
    S: 128 85 6 0 
    19674 220
    S: 128 85 6 0 
    19686 220
    S: 128 85 6 0 
    19699 220
    S: 128 85 6 0 
    19713 220
    S: 128 85 6 0 
    19729 220
    S: 128 85 6 0 
    19740 220
    S: 128 85 6 0 
    19760 220
    S: 128 85 6 0 
    19780 220
    S: 128 85 6 0 
    19792 220
    S: 128 85 6 0 
    19805 220
    S: 128 85 6 0 
    19819 220
    S: 128 85 6 0 
    19839 220
    S: 128 85 6 0 
    19858 220
    S: 128 85 6 0 
    19869 220
    S: 128 85 6 0 
    19883 220
    S: 128 85 6 0 
    19897 220
    S: 128 85 6 0 
    19910 220
    S: 128 85 6 0 
    19924 220
    S: 128 85 6 0 
    19938 220
    S: 128 85 6 0 
    19951 220
    S: 128 85 6 0 
    19965 220
    S: 128 85 6 0 
    19979 220
    S: 128 85 6 0 
    19993 220
    S: 128 85 6 0 
    20006 220
    S: 128 85 6 0 
    20027 220
    S: 128 85 6 0 
    20038 220
    S: 128 85 6 0 
    20053 220
    S: 128 85 6 0 
    20066 220
    S: 128 85 6 0 
    20079 220
    S: 128 85 6 0 
    20093 220
    S: 128 85 6 0 
    20107 220
    S: 128 85 6 0 
    20120 220
    S: 128 85 6 0 
    20134 220
    S: 128 85 6 0 
    20155 220
    S: 128 85 6 0 
    20167 220
    S: 128 85 6 0 
    20183 220
    S: 128 85 6 0 
    20195 220
    S: 128 85 6 0 
    20208 220
    S: 128 85 6 0 
    20222 220
    S: 128 85 6 0 
    20236 220
    S: 128 85 6 0 
    20250 220
    S: 128 85 6 0 
    20263 220
    S: 128 85 6 0 
    20277 220
    S: 128 85 6 0 
    20291 220
    S: 128 85 6 0 
    20304 220
    S: 128 85 6 0 
    20318 220
    S: 128 85 6 0 
    20332 220
    S: 128 85 6 0 
    20345 220
    S: 128 85 6 0 
    20359 220
    S: 128 85 6 0 
    20373 220
    S: 128 85 6 0 
    20393 220
    S: 128 85 6 0 
    20405 220
    S: 128 85 6 0 
    20418 220
    S: 128 85 6 0 
    20433 220
    S: 128 85 6 0 
    20446 220
    S: 128 85 6 0 
    20465 220
    S: 128 85 6 0 
    20477 220
    S: 128 85 6 0 
    20491 220
    S: 128 85 6 0 
    20505 220
    S: 128 85 6 0 
    20518 220
    S: 128 85 6 0 
    20532 220
    S: 128 85 6 0 
    20546 220
    S: 128 85 6 0 
    20559 220
    S: 128 85 6 0 
    20573 220
    S: 128 85 6 0 
    20587 220
    S: 128 85 6 0 
    20600 220
    S: 128 85 6 0 
    20614 220
    S: 128 85 6 0 
    20628 220
    S: 128 85 6 0 
    20641 220
    S: 128 85 6 0 
    20655 220
    S: 128 85 6 0 
    20669 220
    S: 128 85 6 0 
    20683 220
    S: 128 85 6 0 
    20697 220
    S: 128 85 6 0 
    20710 220
    S: 128 85 6 0 
    20724 220
    S: 128 85 6 0 
    20737 220
    S: 128 85 6 0 
    20751 220
    S: 128 85 6 0 
    20765 220
    S: 128 85 6 0 
    20779 220
    S: 128 85 6 0 
    20798 220
    S: 128 85 6 0 
    20810 220
    S: 128 85 6 0 
    20827 220
    S: 128 85 6 0 
    20839 220
    S: 128 85 6 0 
    20852 220
    S: 128 85 6 0 
    20866 220
    S: 128 85 6 0 
    20880 220
    S: 128 85 6 0 
    20894 220
    S: 128 85 6 0 
    20907 220
    S: 128 85 6 0 
    20921 220
    S: 128 85 6 0 
    20934 220
    S: 128 85 6 0 
    20948 220
    S: 128 85 6 0 
    20962 220
    S: 128 85 6 0 
    20976 220
    S: 128 85 6 0 
    20989 220
    S: 128 85 6 0 
    21003 220
    S: 128 85 6 0 
    21019 220
    S: 128 85 6 0 
    21031 220
    S: 128 85 6 0 
    21045 220
    S: 128 85 6 0 
    21062 220
    S: 128 85 6 0 
    21074 220
    S: 128 85 6 0 
    21087 220
    S: 128 85 6 0 
    21104 220
    S: 128 85 6 0 
    21116 220
    S: 128 85 6 0 
    21129 220
    S: 128 85 6 0 
    21143 220
    S: 128 85 6 0 
    21156 220
    S: 128 85 6 0 
    21170 220
    S: 128 85 6 0 
    21184 220
    S: 128 85 6 0 
    21197 220
    S: 128 85 6 0 
    21211 220
    S: 128 85 6 0 
    21225 220
    S: 128 85 6 0 
    21238 220
    S: 128 85 6 0 
    21252 220
    S: 128 85 6 0 
    21266 220
    S: 128 85 6 0 
    21280 220
    S: 128 85 6 0 
    21293 220
    S: 128 85 6 0 
    21307 220
    S: 128 85 6 0 
    21321 220
    S: 128 85 6 0 
    21337 220
    S: 128 85 6 0 
    21350 220
    S: 128 85 6 0 
    21362 220
    S: 128 85 6 0 
    21376 220
    S: 128 85 6 0 
    21389 220
    S: 128 85 6 0 
    21403 220
    S: 128 85 6 0 
    21417 220
    S: 128 85 6 0 
    21431 220
    S: 128 85 6 0 
    21444 220
    S: 128 85 6 0 
    21458 220
    S: 128 85 6 0 
    21472 220
    S: 128 85 6 0 
    21486 220
    S: 128 85 6 0 
    21499 220
    S: 128 85 6 0 
    21513 220
    S: 128 85 6 0 
    21526 220
    S: 128 85 6 0 
    21540 220
    S: 128 85 6 0 
    21554 220
    S: 128 85 6 0 
    21568 220
    S: 128 85 6 0 
    21581 220
    S: 128 85 6 0 
    21595 220
    S: 128 85 6 0 
    21609 220
    S: 128 85 6 0 
    21622 220
    S: 128 85 6 0 
    21636 220
    S: 128 85 6 0 
    21650 220
    S: 128 85 6 0 
    21664 220
    S: 128 85 6 0 
    21677 220
    S: 128 85 6 0 
    21692 220
    S: 128 85 6 0 
    21705 220
    S: 128 85 6 0 
    21718 220
    S: 128 85 6 0 
    21734 220
    S: 128 85 6 0 
    21746 220
    S: 128 85 6 0 
    21759 220
    S: 128 85 6 0 
    21773 220
    S: 128 85 6 0 
    21787 220
    S: 128 85 6 0 
    21801 220
    S: 128 85 6 0 
    21814 220
    S: 128 85 6 0 
    21828 220
    S: 128 85 6 0 
    21842 220
    S: 128 85 6 0 
    21855 220
    S: 128 85 6 0 
    21869 220
    S: 128 85 6 0 
    21883 220
    S: 128 85 6 0 
    21897 220
    S: 128 85 6 0 
    21910 220
    S: 128 85 6 0 
    21924 220
    S: 128 85 6 0 
    21938 220
    S: 128 85 6 0 
    21951 220
    S: 128 85 6 0 
    21965 220
    S: 128 85 6 0 
    21979 220
    S: 128 85 6 0 
    21992 220
    S: 128 85 6 0 
    22006 220
    S: 128 85 6 0 
    22020 220
    S: 128 85 6 0 
    22034 220
    S: 128 85 6 0 
    22047 220
    S: 128 85 6 0 
    22061 220
    S: 128 85 6 0 
    22075 220
    S: 128 85 6 0 
    22088 220
    S: 128 85 6 0 
    22102 220
    S: 128 85 6 0 
    22116 220
    S: 128 85 6 0 
    22130 220
    S: 128 85 6 0 
    22143 220
    S: 128 85 6 0 
    22157 220
    S: 128 85 6 0 
    22174 220
    S: 128 85 6 0 
    22186 220
    S: 128 85 6 0 
    22200 220
    S: 128 85 6 0 
    22213 220
    S: 128 85 6 0 
    22227 220
    S: 128 85 6 0 
    22241 220
    S: 128 85 6 0 
    22257 220
    S: 128 85 6 0 
    22271 220
    S: 128 85 6 0 
    22282 220
    S: 128 85 6 0 
    22296 220
    S: 128 85 6 0 
    22312 220
    S: 128 85 6 0 
    22324 220
    S: 128 85 6 0 
    22338 220
    S: 128 85 6 0 
    22352 220
    S: 128 85 6 0 
    22365 220
    S: 128 85 6 0 
    22383 220
    S: 128 85 6 0 
    22399 220
    S: 128 85 6 0 
    22411 220
    S: 128 85 6 0 
    22425 220
    S: 128 85 6 0 
    22438 220
    S: 128 85 6 0 
    22452 220
    S: 128 85 6 0 
    22466 220
    S: 128 85 6 0 
    22480 220
    S: 128 85 6 0 
    22493 220
    S: 128 85 6 0 
    22507 220
    S: 128 85 6 0 
    22521 220
    S: 128 85 6 0 
    22534 220
    S: 128 85 6 0 
    22566 220
    S: 128 85 6 0 
    22579 220
    S: 128 85 6 0 
    22591 220
    S: 128 85 6 0 
    22605 220
    S: 128 85 6 0 
    22619 220
    S: 128 85 6 0 
    22633 220
    S: 128 85 6 0 
    22646 220
    S: 128 85 6 0 
    22660 220
    S: 128 85 6 0 
    22674 220
    S: 128 85 6 0 
    22687 220
    S: 128 85 6 0 
    22701 220
    S: 128 85 6 0 
    22715 220
    S: 128 85 6 0 
    22728 220
    S: 128 85 6 0 
    22742 220
    S: 128 85 6 0 
    22757 220
    S: 128 85 6 0 
    22770 220
    S: 128 85 6 0 
    22783 220
    S: 128 85 6 0 
    22806 220
    S: 128 85 6 0 
    22818 220
    S: 128 85 6 0 
    22833 220
    S: 128 85 6 0 
    22846 220
    S: 128 85 6 0 
    22859 220
    S: 128 85 6 0 
    22883 220
    S: 128 85 6 0 
    22895 220
    S: 128 85 6 0 
    22908 220
    S: 128 85 6 0 
    22924 220
    S: 128 85 6 0 
    22936 220
    S: 128 85 6 0 
    22950 220
    S: 128 85 6 0 
    22963 220
    S: 128 85 6 0 
    22977 220
    S: 128 85 6 0 
    22991 220
    S: 128 85 6 0 
    23004 220
    S: 128 85 6 0 
    23018 220
    S: 128 85 6 0 
    23032 220
    S: 128 85 6 0 
    23045 220
    S: 128 85 6 0 
    23059 220
    S: 128 85 6 0 
    23073 220
    S: 128 85 6 0 
    23087 220
    S: 128 85 6 0 
    23100 220
    S: 128 85 6 0 
    23114 220
    S: 128 85 6 0 
    23130 220
    S: 128 85 6 0 
    23141 220
    S: 128 85 6 0 
    23155 220
    S: 128 85 6 0 
    23170 220
    S: 128 85 6 0 
    23184 220
    S: 128 85 6 0 
    23197 220
    S: 128 85 6 0 
    23210 220
    S: 128 85 6 0 
    23227 220
    S: 128 85 6 0 
    23239 220
    S: 128 85 6 0 
    23257 220
    S: 128 85 6 0 
    23269 220
    S: 128 85 6 0 
    23282 220
    S: 128 85 6 0 
    23296 220
    S: 128 85 6 0 
    23310 220
    S: 128 85 6 0 
    23323 220
    S: 128 85 6 0 
    23337 220
    S: 128 85 6 0 
    23353 220
    S: 128 85 6 0 
    23365 220
    S: 128 85 6 0 
    23378 220
    S: 128 85 6 0 
    23392 220
    S: 128 85 6 0 
    23406 220
    S: 128 85 6 0 
    23420 220
    S: 128 85 6 0 
    23437 220
    S: 128 85 6 0 
    23449 220
    S: 128 85 6 0 
    23462 220
    S: 128 85 6 0 
    23476 220
    S: 128 85 6 0 
    23490 220
    S: 128 85 6 0 
    23504 220
    S: 128 85 6 0 
    23517 220
    S: 128 85 6 0 
    23531 220
    S: 128 85 6 0 
    23545 220
    S: 128 85 6 0 
    23558 220
    S: 128 85 6 0 
    23572 220
    S: 128 85 6 0 
    23589 220
    S: 128 85 6 0 
    23601 220
    S: 128 85 6 0 
    23614 220
    S: 128 85 6 0 
    23628 220
    S: 128 85 6 0 
    23642 220
    S: 128 85 6 0 
    23656 220
    S: 128 85 6 0 
    23669 220
    S: 128 85 6 0 
    23683 220
    S: 128 85 6 0 
    23697 220
    S: 128 85 6 0 
    23710 220
    S: 128 85 6 0 
    23724 220
    S: 128 85 6 0 
    23738 220
    S: 128 85 6 0 
    23752 220
    S: 128 85 6 0 
    23765 220
    S: 128 85 6 0 
    23779 220
    S: 128 85 6 0 
    23793 220
    S: 128 85 6 0 
    23806 220
    S: 128 85 6 0 
    23820 220
    S: 128 85 6 0 
    23834 220
    S: 128 85 6 0 
    23847 220
    S: 128 85 6 0 
    23861 220
    S: 128 85 6 0 
    23875 220
    S: 128 85 6 0 
    23889 220
    S: 128 85 6 0 
    23902 220
    S: 128 85 6 0 
    23916 220
    S: 128 85 6 0 
    23930 220
    S: 128 85 6 0 
    23954 220
    S: 128 85 6 0 
    23966 220
    S: 128 85 6 0 
    23979 220
    S: 128 85 6 0 
    23993 220
    S: 128 85 6 0 
    24007 220
    S: 128 85 6 0 
    24027 220
    S: 128 85 6 0 
    24038 220
    S: 128 85 6 0 
    24052 220
    S: 128 85 6 0 
    24066 220
    S: 128 85 6 0 
    24080 220
    S: 128 85 6 0 
    24093 220
    S: 128 85 6 0 
    24110 220
    S: 128 85 6 0 
    24121 220
    S: 128 85 6 0 
    24135 220
    S: 128 85 6 0 
    24149 220
    S: 128 85 6 0 
    24162 220
    S: 128 85 6 0 
    24176 220
    S: 128 85 6 0 
    24190 220
    S: 128 85 6 0 
    24204 220
    S: 128 85 6 0 
    24217 220
    S: 128 85 6 0 
    24231 220
    S: 128 85 6 0 
    24245 220
    S: 128 85 6 0 
    24258 220
    S: 128 85 6 0 
    24272 220
    S: 128 85 6 0 
    24286 220
    S: 128 85 6 0 
    24300 220
    S: 128 85 6 0 
    24313 220
    S: 128 85 6 0 
    24327 220
    S: 128 85 6 0 
    24341 220
    S: 128 85 6 0 
    24354 220
    S: 128 85 6 0 
    24368 220
    S: 128 85 6 0 
    24382 220
    S: 128 85 6 0 
    24401 220
    S: 128 85 6 0 
    24412 220
    S: 128 85 6 0 
    24426 220
    S: 128 85 6 0 
    24440 220
    S: 128 85 6 0 
    24453 220
    S: 128 85 6 0 
    24467 220
    S: 128 85 6 0 
    24481 220
    S: 128 85 6 0 
    24494 220
    S: 128 85 6 0 
    24510 220
    S: 128 85 6 0 
    24522 220
    S: 128 85 6 0 
    24536 220
    S: 128 85 6 0 
    24549 220
    S: 128 85 6 0 
    24565 220
    S: 128 85 6 0 
    24577 220
    S: 128 85 6 0 
    24590 220
    S: 128 85 6 0 
    24605 220
    S: 128 85 6 0 
    24618 220
    S: 128 85 6 0 
    24632 220
    S: 128 85 6 0 
    24645 220
    S: 128 85 6 0 
    24659 220
    S: 128 85 6 0 
    24673 220
    S: 128 85 6 0 
    24686 220
    S: 128 85 6 0 
    24700 220
    S: 128 85 6 0 
    24715 220
    S: 128 85 6 0 
    24728 220
    S: 128 85 6 0 
    24741 220
    S: 128 85 6 0 
    24755 220
    S: 128 85 6 0 
    24769 220
    S: 128 85 6 0 
    24784 220
    S: 128 85 6 0 
    24796 220
    S: 128 85 6 0 
    24810 220
    S: 128 85 6 0 
    24823 220
    S: 128 85 6 0 
    24837 220
    S: 128 85 6 0 
    24851 220
    S: 128 85 6 0 
    24865 220
    S: 128 85 6 0 
    24878 220
    S: 128 85 6 0 
    24892 220
    S: 128 85 6 0 
    24922 220
    S: 128 85 6 0 
    24938 220
    S: 128 85 6 0 
    24950 220
    S: 128 85 6 0 
    24969 220
    S: 128 85 6 0 
    24982 220
    S: 128 85 6 0 
    24995 220
    S: 128 85 6 0 
    25008 220
    S: 128 85 6 0 
    25025 220
    S: 128 85 6 0 
    25037 220
    S: 128 85 6 0 
    25051 220
    S: 128 85 6 0 
    25064 220
    S: 128 85 6 0 
    25078 220
    S: 128 85 6 0 
    25091 220
    S: 128 85 6 0 
    25105 220
    S: 128 85 6 0 
    25119 220
    S: 128 85 6 0 
    25133 220
    S: 128 85 6 0 
    25146 220
    S: 128 85 6 0 
    25160 220
    S: 128 85 6 0 
    25177 220
    S: 128 85 6 0 
    25191 220
    S: 128 85 6 0 
    25202 220
    S: 128 85 6 0 
    25216 220
    S: 128 85 6 0 
    25230 220
    S: 128 85 6 0 
    25243 220
    S: 128 85 6 0 
    25257 220
    S: 128 85 6 0 
    25271 220
    S: 128 85 6 0 
    25284 220
    S: 128 85 6 0 
    25298 220
    S: 128 85 6 0 
    25312 220
    S: 128 85 6 0 
    25326 220
    S: 128 85 6 0 
    25339 220
    S: 128 85 6 0 
    25353 220
    S: 128 85 6 0 
    25367 220
    S: 128 85 6 0 
    25381 220
    S: 128 85 6 0 
    25394 220
    S: 128 85 6 0 
    25408 220
    S: 128 85 6 0 
    25421 220
    S: 128 85 6 0 
    25435 220
    S: 128 85 6 0 
    25449 220
    S: 128 85 6 0 
    25463 220
    S: 128 85 6 0 
    25476 220
    S: 128 85 6 0 
    25490 220
    S: 128 85 6 0 
    25508 220
    S: 128 85 6 0 
    25522 220
    S: 128 85 6 0 
    25536 220
    S: 128 85 6 0 
    25552 220
    S: 128 85 6 0 
    25563 220
    S: 128 85 6 0 
    25577 220
    S: 128 85 6 0 
    25591 220
    S: 128 85 6 0 
    25604 220
    S: 128 85 6 0 
    25618 220
    S: 128 85 6 0 
    25632 220
    S: 128 85 6 0 
    25645 220
    S: 128 85 6 0 
    25660 220
    S: 128 85 6 0 
    25673 220
    S: 128 85 6 0 
    25687 220
    S: 128 85 6 0 
    25706 220
    S: 128 85 6 0 
    25717 220
    S: 128 85 6 0 
    25731 220
    S: 128 85 6 0 
    25745 220
    S: 128 85 6 0 
    25783 220
    S: 128 85 6 0 
    25794 220
    S: 128 85 6 0 
    25815 220
    S: 128 85 6 0 
    25827 220
    S: 128 85 6 0 
    25844 220
    S: 128 85 6 0 
    25858 220
    S: 128 85 6 0 
    25906 220
    S: 128 85 6 0 
    25917 220
    S: 128 85 6 0 
    25931 220
    S: 128 85 6 0 
    25950 220
    S: 128 85 6 0 
    25962 220
    S: 128 85 6 0 
    25983 220
    S: 128 85 6 0 
    25996 220
    S: 128 85 6 0 
    26008 220
    S: 128 85 6 0 
    26022 220
    S: 128 85 6 0 
    26036 220
    S: 128 85 6 0 
    26049 220
    S: 128 85 6 0 
    26063 220
    S: 128 85 6 0 
    26077 220
    S: 128 85 6 0 
    26090 220
    S: 128 85 6 0 
    26104 220
    S: 128 85 6 0 
    26118 220
    S: 128 85 6 0 
    26132 220
    S: 128 85 6 0 
    26145 220
    S: 128 85 6 0 
    26159 220
    S: 128 85 6 0 
    26173 220
    S: 128 85 6 0 
    26186 220
    S: 128 85 6 0 
    26210 220
    S: 128 85 6 0 
    26221 220
    S: 128 85 6 0 
    26235 220
    S: 128 85 6 0 
    26249 220
    S: 128 85 6 0 
    26265 220
    S: 128 85 6 0 
    26277 220
    S: 128 85 6 0 
    26290 220
    S: 128 85 6 0 
    26304 220
    S: 128 85 6 0 
    26318 220
    S: 128 85 6 0 
    26333 220
    S: 128 85 6 0 
    26346 220
    S: 128 85 6 0 
    26359 220
    S: 128 85 6 0 
    26373 220
    S: 128 85 6 0 
    26386 220
    S: 128 85 6 0 
    26400 220
    S: 128 85 6 0 
    26414 220
    S: 128 85 6 0 
    26428 220
    S: 128 85 6 0 
    26441 220
    S: 128 85 6 0 
    26455 220
    S: 128 85 6 0 
    26469 220
    S: 128 85 6 0 
    26482 220
    S: 128 85 6 0 
    26496 220
    S: 128 85 6 0 
    26510 220
    S: 128 85 6 0 
    26523 220
    S: 128 85 6 0 
    26537 220
    S: 128 85 6 0 
    26551 220
    S: 128 85 6 0 
    26565 220
    S: 128 85 6 0 
    26578 220
    S: 128 85 6 0 
    26592 220
    S: 128 85 6 0 
    26606 220
    S: 128 85 6 0 
    26619 220
    S: 128 85 6 0 
    26634 220
    S: 128 85 6 0 
    26647 220
    S: 128 85 6 0 
    26677 220
    S: 128 85 6 0 
    26690 220
    S: 128 85 6 0 
    26703 220
    S: 128 85 6 0 
    26716 220
    S: 128 85 6 0 
    26730 220
    S: 128 85 6 0 
    26744 220
    S: 128 85 6 0 
    26758 220
    S: 128 85 6 0 
    26771 220
    S: 128 85 6 0 
    26785 220
    S: 128 85 6 0 
    26799 220
    S: 128 85 6 0 
    26814 220
    S: 128 85 6 0 
    26826 220
    S: 128 85 6 0 
    26840 220
    S: 128 85 6 0 
    26854 220
    S: 128 85 6 0 
    26867 220
    S: 128 85 6 0 
    26881 220
    S: 128 85 6 0 
    26895 220
    S: 128 85 6 0 
    26908 220
    S: 128 85 6 0 
    26922 220
    S: 128 85 6 0 
    26936 220
    S: 128 85 6 0 
    26949 220
    S: 128 85 6 0 
    26963 220
    S: 128 85 6 0 
    26977 220
    S: 128 85 6 0 
    26991 220
    S: 128 85 6 0 
    27004 220
    S: 128 85 6 0 
    27018 220
    S: 128 85 6 0 
    27032 220
    S: 128 85 6 0 
    27045 220
    S: 128 85 6 0 
    27059 220
    S: 128 85 6 0 
    27073 220
    S: 128 85 6 0 
    27087 220
    S: 128 85 6 0 
    27100 220
    S: 128 85 6 0 
    27114 220
    S: 128 85 6 0 
    27128 220
    S: 128 85 6 0 
    27141 220
    S: 128 85 6 0 
    27155 220
    S: 128 85 6 0 
    27170 220
    S: 128 85 6 0 
    27182 220
    S: 128 85 6 0 
    27196 220
    S: 128 85 6 0 
    27210 220
    S: 128 85 6 0 
    27224 220
    S: 128 85 6 0 
    27237 220
    S: 128 85 6 0 
    27251 220
    S: 128 85 6 0 
    27265 220
    S: 128 85 6 0 
    27278 220
    S: 128 85 6 0 
    27292 220
    S: 128 85 6 0 
    27306 220
    S: 128 85 6 0 
    27320 220
    S: 128 85 6 0 
    27333 220
    S: 128 85 6 0 
    27347 220
    S: 128 85 6 0 
    27366 220
    S: 128 85 6 0 
    27377 220
    S: 128 85 6 0 
    27391 220
    S: 128 85 6 0 
    27405 220
    S: 128 85 6 0 
    27419 220
    S: 128 85 6 0 
    27438 220
    S: 128 85 6 0 
    27449 220
    S: 128 85 6 0 
    27463 220
    S: 128 85 6 0 
    27476 220
    S: 128 85 6 0 
    27490 220
    S: 128 85 6 0 
    27504 220
    S: 128 85 6 0 
    27518 220
    S: 128 85 6 0 
    27531 220
    S: 128 85 6 0 
    27545 220
    S: 128 85 6 0 
    27559 220
    S: 128 85 6 0 
    27572 220
    S: 128 85 6 0 
    27586 220
    S: 128 85 6 0 
    27600 220
    S: 128 85 6 0 
    27613 220
    S: 128 85 6 0 
    27650 220
    S: 128 85 6 0 
    27662 220
    S: 128 85 6 0 
    27676 220
    S: 128 85 6 0 
    27689 220
    S: 128 85 6 0 
    27709 220
    S: 128 85 6 0 
    27721 220
    S: 128 85 6 0 
    27747 220
    S: 128 85 6 0 
    27758 220
    S: 128 85 6 0 
    27772 220
    S: 128 85 6 0 
    27789 220
    S: 128 85 6 0 
    27811 220
    S: 128 85 6 0 
    27826 220
    S: 128 85 6 0 
    27838 220
    S: 128 85 6 0 
    27851 220
    S: 128 85 6 0 
    27865 220
    S: 128 85 6 0 
    27881 220
    S: 128 85 6 0 
    27916 220
    S: 128 85 6 0 
    27929 220
    S: 128 85 6 0 
    27947 220
    S: 128 85 6 0 
    27961 220
    S: 128 85 6 0 
    27973 220
    S: 128 85 6 0 
    27986 220
    S: 128 85 6 0 
    28000 220
    S: 128 85 6 0 
    28014 220
    S: 128 85 6 0 
    28028 220
    S: 128 85 6 0 
    28045 220
    S: 128 85 6 0 
    28059 220
    S: 128 85 6 0 
    28071 220
    S: 128 85 6 0 
    28087 220
    S: 128 85 6 0 
    28099 220
    S: 128 85 6 0 
    28112 220
    S: 128 85 6 0 
    28126 220
    S: 128 85 6 0 
    28151 220
    S: 128 85 6 0 
    28162 220
    S: 128 85 6 0 
    28176 220
    S: 128 85 6 0 
    28200 220
    S: 128 85 6 0 
    28213 220
    S: 128 85 6 0 
    28228 220
    S: 128 85 6 0 
    28251 220
    S: 128 85 6 0 
    28263 220
    S: 128 85 6 0 
    28276 220
    S: 128 85 6 0 
    28290 220
    S: 128 85 6 0 
    28304 220
    S: 128 85 6 0 
    28317 220
    S: 128 85 6 0 
    28331 220
    S: 128 85 6 0 
    28348 220
    S: 128 85 6 0 
    28360 220
    S: 128 85 6 0 
    28373 220
    S: 128 85 6 0 
    28387 220
    S: 128 85 6 0 
    28401 220
    S: 128 85 6 0 
    28414 220
    S: 128 85 6 0 
    28428 220
    S: 128 85 6 0 
    28442 220
    S: 128 85 6 0 
    28456 220
    S: 128 85 6 0 
    28469 220
    S: 128 85 6 0 
    28484 220
    S: 128 85 6 0 
    28497 220
    S: 128 85 6 0 
    28510 220
    S: 128 85 6 0 
    28524 220
    S: 128 85 6 0 
    28538 220
    S: 128 85 6 0 
    28552 220
    S: 128 85 6 0 
    28565 220
    S: 128 85 6 0 
    28579 220
    S: 128 85 6 0 
    28594 220
    S: 128 85 6 0 
    28606 220
    S: 128 85 6 0 
    28620 220
    S: 128 85 6 0 
    28634 220
    S: 128 85 6 0 
    28648 220
    S: 128 85 6 0 
    28661 220
    S: 128 85 6 0 
    28675 220
    S: 128 85 6 0 
    28689 220
    S: 128 85 6 0 
    28706 220
    S: 128 85 6 0 
    28720 220
    S: 128 85 6 0 
    28731 220
    S: 128 85 6 0 
    28745 220
    S: 128 85 6 0 
    28759 220
    S: 128 85 6 0 
    28772 220
    S: 128 85 6 0 
    28786 220
    S: 128 85 6 0 
    28801 220
    S: 128 85 6 0 
    28814 220
    S: 128 85 6 0 
    28827 220
    S: 128 85 6 0 
    28841 220
    S: 128 85 6 0 
    28855 220
    S: 128 85 6 0 
    28868 220
    S: 128 85 6 0 
    28882 220
    S: 128 85 6 0 
    28896 220
    S: 128 85 6 0 
    28910 220
    S: 128 85 6 0 
    28923 220
    S: 128 85 6 0 
    28937 220
    S: 128 85 6 0 
    28951 220
    S: 128 85 6 0 
    28967 220
    S: 128 85 6 0 
    28979 220
    S: 128 85 6 0 
    28992 220
    S: 128 85 6 0 
    29006 220
    S: 128 85 6 0 
    29020 220
    S: 128 85 6 0 
    29034 220
    S: 128 85 6 0 
    29047 220
    S: 128 85 6 0 
    29064 220
    S: 128 85 6 0 
    29076 220
    S: 128 85 6 0 
    29089 220
    S: 128 85 6 0 
    29104 220
    S: 128 85 6 0 
    29117 220
    S: 128 85 6 0 
    29131 220
    I get about 12-16ms response times doing some tests, this is from T3.6 sending a 14 byte payload to it's ESP, then from ESP to other ESP, then ACK return from remote ESP, which is a 4 byte payload (header and ACK included).

    Teensy 3.6 is running at 180mhz as usual, it's attached to the esp via 6 wires
    RX,TX as usual, however, GPIO2 (Serial1 TX) is going to Teensy RX1, BUT, regular ESP Uart0 RX goes to Teensy TX port. Basically, your using the ESP's dedicated communication back to the teensy for responses, so debug spew wont be seen from regular esp uart. thats 3 wires there.
    I also selected pin 4 (4th wire), as an output. that goes to pin 2 of teensy and teensy sets pin 2 as INPUT_PULLDOWN. the moment the line is triggered, Serial1.end() is called once only. when deasserted, Serial1.begin(115200) is called again to restore uart connection. Doing this allowed me to reprogram the ESP without detaching it from teensy! if your asking how? simple, as long as the esp is driving it's INVERTED gpio teensy kills the tx1 port so esp uart programmer has full control, when putting esp in programming mode is when teensy knows to cut the port, only when the esp boots and drives the gpio is when teensy reenables the port

    for the 5V and GND, i used VIN and GND on the ESP, to make things easier, DO NOT USE 5 V for either T3.6 or ESP, however, since im using adafruit's HUZZAH esp breakout, it has built in level shifters, and can plug directly to the T3.6 using those 6 wires alone for wireless controlling.

    The communication protocol I will be writing up will be using TCP websockets, CRC verifications at the source before TCP transfers, and ACKnowledgements on a given command, should any timeouts occur, they will be handled with possible resends if necessary. One of the things that will be implemented for all calls is waiting for ACK's before sending more packets, this should work nicely for slow internets/routers

    Sorry it's actually 5 wires to the huzzah,

    ESP TEENSY
    GND GND
    VCC VCC
    RX0 TX1
    TX1 RX1
    GPIO4 PIN2
    Last edited by tonton81; 11-10-2017 at 07:57 AM.

  12. #37
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    update: its been quite a few hours now and just wanna say that both esps have not crashed their socket connections despite being hammered in a tight loop without any delays/timers, strictly only the time to send another packet only after an ACK is received from the REMOTE esp, i had to close the serial monitor because after a few minutes it locks up and needs to force close due to the heavy flow of debug data posted above, since goio2(tx1) of esp has the led on the huzzah, you can see it blink very fast as the data flows to the teensy direction

    im at work now and i hope this tight loop continues by the time i get home in 5 hrs, the last few hours its been solid using a crappy BELL router as the connection for both ESPs

  13. #38
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    good news! the protocol is comming along. I currently implemented an event system, that hopefully i will add to a handler in the future.
    Teensy is capable of knowing the websocket and wifi connection statuses, and I'm debugging/coding at a baud rate of 2,000,000 baud. 3,456,000 works, but due to serial monitor not supporting it, ill stick with 2mill for now. btw, 4+mil hasnt worked for me.
    The ssid and pass is no longer stored on the HOST's ESP. in teensy's setup() you'll be able to put the connect command with your own SSID/PASS.
    I also made the protocol transfer websocket connections. This will allow us to control unlimited amount of Teensies ( provided they have their own IP address). the websockets seem to connect almost instantly so thats a plus!
    most of the functions have been done in the user sketch, and I'll be working on the HOST library this week as most of the pain is over with the ESP uart protocol handling.

    here is a sample of a 9 byte payload * 8 being transfered over wifi from the host ESP to the slave ESP, with an ACK response from the remote ESP, over wifi:
    Code:
    Start: 3308
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    End: 3424
    116ms for 8 packets. Let me try 32... one sec:
    Code:
    Start: 4695
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    100794115
    End: 4931
    236ms!

    100794115 is a DEC value, but the way I coded the local/remote ACK/NAK, and controller is by HEX values. So, 100794115 == 0x0601FF03, 06=ACK,01=REMOTE,FF=OPTIONAL,03==WiFi.status(); <-- kind of useless on a remote ACK, I might change that to an option for the remote ACK support. I might even use it for the SPI 8/16bit transfers, Example. 0x06013344, 0x3344 == 16bit reply included in ACK for processing at host..

    rather than designing another 2 way protocol at the slave end via uart, since the ESP supports SPI.transfer16, I will be coding that one later after the HOST side is done.
    due to the nature of ESP's aweful self-slave buggy spi handling, i had to resort to uart at host side, but SPI will make things simpler on the other end since ESP works fine as master.

    my project implementation will be like this:

    teensy 3.6 master <-- (uart) --><--esp8266 --> wifi router <--> esp8266 <-- (spi) --> teensy3.5 slave

    note: come to think about it, maybe i cant push 4mill+ because the adafruit huzzah breakout has level shifters, maybe thats the problem... either way, 2000000 and 3456000 work fine
    Last edited by tonton81; 11-13-2017 at 07:59 AM.

  14. #39
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Good evening, after a few weeks of daily planning and working on a uart protocol to link the esp's to teensy ( and NOT using AT firmware.. ), I managed to finish off the I2C, UART, and SPI interfaces over wifi today
    The class constructor takes a socket IP connection assigned to the peripheral, and the functions auto connect to the proper socket when controlling it's class object. This makes it possible to control many teensies over the LAN/WAN directly by IP.

    Current implementations included are:
    Pins:
    digitalRead
    digitalWrite
    pinMode
    AnalogRead
    AnalogReadResolution
    AnalogWrite
    AnalogWriteResolution

    Uart: (7 including usb serial )
    Read
    ReadBytes(buf, len)
    Write
    Write(buf, len) <--- when dealing with networking, this IS indeed ideal for a payload packet!
    Peek
    Available
    Begin

    SPI: (All 3 ports)
    Begin
    BeginTransaction
    EndTransaction
    transfer()
    transfer16()
    transfer32() <-- This i added, it just writes 2 uint16's at the endpoint slave.. and returns a uint32_t to the master end


    I2C: (All 3 busses, 4 if you use a t3.6)
    Begin
    Peek
    Read
    Write
    Endtransmission
    BeginTransmission
    Available

    Heres a demo of a single LCD at endpoint set at 650,000 baudrate via host T3.6, while the host remotely toggles the LED on the T3.5 slave
    https://www.youtube.com/watch?v=rabUKzNFDfg

    Note: The ESP does not have the connection credentials, nor IP addressing, the T3.6 sets the ESP's SSID/PASS connection, static IP, and the sockets are automatically established by the objects assigned to them. I plan to port as much control over to the master side. Keep in mind, I am not using the AT firmware, this gives me full code access to the ESP's linked, not only the slave T3.5. This gives possibility, even without a slave, to control a remote ESP as standalone (for i2c/spi traffic, or pin states...

    I modified the display library to use the Serial.write(buf, sizeof(buf) method instead of the byte-by-byte method it used, too much overhead on wifi, so its pretty decent

    I do have plans for a handler thats already written, but unused so far, to take "status updates" from UDP slave notices or remote connection status messages (from unconnected slaves). This will be done somewhere later on when I've got most of the code done. The current system runs dual acknowledgements from local and remote, as well as CRC checks. the ESP's and the Teensy's talk to each other at 2Megabaud uart rates and have had *0* display data corruption errors while polling display in a tight loop.

    the constructor is written as:
    teensywifi_controller mySerialPort = teensywifi_controller("Serial1", &Serial1, &myHandler, "192.168.2.168:80");

    mySerialPort is assigned to Serial1 on the remote slave, &Serial1 is the local ESP connected link, the handler is there, but not programmed with anything yet, and the ip&port is for the socket connection to the slave
    So every time you use one of the mySerialPort serial commands, it makes sure its connected to that assigned socket before running it, if its already connected, it just does what its supposed to do as normal

    mySerialPort.config("192.168.2.10", "192.168.2.1", "255.255.255.0");
    This sets the static IP of the ESP, (from the teensy sketch)

    mySerialPort.connect("ssid", "pass"); // connect to wifi address (in teensy sketch)

    Later on I would also like to implement SPI payloads ( Full SPI transactions over a single packet ). The code is Very capable of sending out X amount of bytes in a packet, and taking X amount of bytes returned.

    as usual, none of my code uses "Strings". character arrays always are a plus!

    Tony
    Last edited by tonton81; 12-04-2017 at 01:34 AM.

  15. #40
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    Added support:
    for eeprom read, update, length, crc, write
    servo control added
    fastled !! https://www.youtube.com/watch?v=rWOwf272Pl8

    the led array is passed over a single payload, into a non-static CRGB buffer array which sizes to the host array, and drops to the specified pin
    FASTLED.show(pin, array, array_lenth)

    the speed is insane! lol

    the entire array is checksummed and a remote ACK is required before next update obviously, any pin can be dynamically chosen to use fastled, except the blocked ones which are assigned to the peripheral ports, un-commenting the pin will allow fastled to use it if needed, but i commented out all the SPI, I2C, UART in the fastled section

    The video test above is with 35 leds, it seems the 2x esps, 2x teensies, and the leds took too much juice from the USB3 slots in my PC.. LOL
    the colors are random(0x00,0xFF);

    i still didnt add the necessary defines for the ports, these tests are ran on a T3.5 slave

    Code:
    T3.6 Host <--uart--> esp8266(adafruit huzzah)   ~~~~ WiFi ~~~~~  (adafruit huzzah)esp8266 <--uart--> T3.5 Slave
                                 ^___________peripheral control___________________________^_______________^
    Plan to add additional support above to the esp links as well, so teensy slave will not be alone in management control

    Edit: LED CHASING!! https://www.youtube.com/watch?v=1ghl3eyKivg

    this isnt so bad either, 650k baud uart display poll writing, led toggling, and fastled at same time, of course, having a crappy router doesnt help
    https://www.youtube.com/watch?v=vjyM36NW_vs

    Edit: I cleaned up a few functions in the links, performance is good, a new video with 144led version of fastled with 650kbaud uart poll writing lcd ( using buffered serial writes) and led toggling
    https://www.youtube.com/watch?v=Y09XxDvg2CI

    Tony
    Last edited by tonton81; 12-04-2017 at 09:47 PM.

  16. #41
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    The master and slave have non collission code in the same functions, so they coexist in the same library now, and both ESP's run the same code. What does this mean? You can have unlimited masters, with unlimited slave connections, and, masters can also control masters!

    check out this video of Teensy on 192.168.2.168 controlling led toggling on teensy 192.168.2.10 and vice versa: https://www.youtube.com/watch?v=RuPVjO1DDnY
    I've also implemented user handler for sending payloads to the remote mcu. What does this mean? we can send a payload to the other teensy, and user can control how he/she wants. Ex. sensor data, logging, etc.
    I still have a 12 byte queue system which is still not embedded with current functions. This will be used later on for "status updates" (if ever used).

  17. #42
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    its been a long effort keeping at it! Check this out:

    teensy host (T3.6) attached to an ESP8266, the code connects to a remote ESP not only to control the teensy, but, why stop there? let's control that teensy's ESP as well!
    I created the dynamic ability to control both the ESP and TEENSY at the other end of the link. What does that mean? I can run UART data to teensy ports while running, ex, FASTLED stream on pin14 of the ESP attached to it.
    This also entitles the user, to control the ESP in standalone mode, without the teensy attached to it, which, also frees up the endpoint communication uart protocol to allow controlling the esp's uart as well! I ran one of the uart display's off it yesturday!

    this is the video of the TEENSY attached to an ESP, controlling a standalone ESP with a led strip attached.
    https://www.youtube.com/watch?v=qoj19DuCC90

    Also! I didn't stop there! I decided to also write transparency code for the local master teensy!

    here is a WifiScan.ino demo, slightly modified at the top, the rest code running as is, flashed to teensy!

    Code:
    /*
     *  This sketch demonstrates how to scan WiFi networks. 
     *  The API is almost the same as with the WiFi Shield library, 
     *  the most obvious difference being the different file you need to include:
     */
    
    
    // #include "ESP8266WiFi.h"  <<---- DELETED !!
    
     //////////////  ADDED   ///////////////
    #include <teensywifi_controller.h>
    teensywifi_controller WiFi = teensywifi_controller("WiFi", &Serial1, "192.168.2.168:80");
    /////////////////////////////////////
    
    
    void setup() {
      Serial.begin(115200);
     Serial1.begin(1000000);   ///// <---------------- ADDED
    
      // Set WiFi to station mode and disconnect from an AP if it was previously connected
      WiFi.mode(WIFI_STA);
      WiFi.disconnect();
      delay(100);
    
      Serial.println("Setup done");
    }
    
    void loop() {
      Serial.println("scan start");
    
      // WiFi.scanNetworks will return the number of networks found
      int n = WiFi.scanNetworks();
      Serial.println("scan done");
      if (n == 0)
        Serial.println("no networks found");
      else
      {
        Serial.print(n);
        Serial.println(" networks found");
        for (int i = 0; i < n; ++i)
        {
          // Print SSID and RSSI for each network found
          Serial.print(i + 1);
          Serial.print(": ");
          Serial.print(WiFi.SSID(i));
          Serial.print(" (");
          Serial.print(WiFi.RSSI(i));
          Serial.print(")");
          Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*");
          delay(10);
        }
      }
      Serial.println("");
      // Wait a bit before scanning again
      delay(5000);
    }
    Now, we open up teensy Serial monitor! what do we see!???

    Code:
    scan done
    16 networks found
    1: BELL351 (-84)*
    2: Bravo2 (-84)*
    3: VIDEOTRON5907 (-89)*
    4: CIK1000M_AC2.4G_9665 (-90)*
    5: VIDEOTRON4858 (-81)*
    6: Ma Connexion (-78)*
    7: BELL649 (-77)*
    8: Gemstelecom08945 (-85)*
    9: DIRECT-16-HP OfficeJet 3830 (-86)*
    10: BELL625 (-88)*
    11: VIDEOTRON4729 (-89)*
    12: SasoDei (-87)*
    13: BELL171 (-91)*
    14: 4D Systems (-57)*
    15: Tony (-59)*
    16: VIDEOTRON1438 (-86)*
    
    scan start
    scan done
    15 networks found
    1: BELL587 (-94)*
    2: 4D Systems (-58)*
    3: SasoDei (-87)*
    4: VIDEOTRON4858 (-80)*
    5: Tony (-57)*
    6: VIDEOTRON5907 (-89)*
    7: BELL351 (-83)*
    8: Ma Connexion (-78)*
    9: DIRECT-16-HP OfficeJet 3830 (-92)*
    10: BELL649 (-80)*
    11: Gemstelecom08945 (-90)*
    12: VIDEOTRON1438 (-89)*
    13: Primeconnect (-85)*
    14: BELL171 (-86)*
    15: Bravo2 (-85)*
    
    scan start
    scan done
    18 networks found
    1: BELL587 (-90)*
    2: BELL065 (-90)*
    3: BELL857 (-93)*
    4: BELL678 (-89)*
    5: VIDEOTRON1438 (-85)*
    6: Bravo2 (-85)*
    7: BELL171 (-90)*
    8: Ma Connexion (-82)*
    9: BELL649 (-80)*
    10: DIRECT-16-HP OfficeJet 3830 (-91)*
    11: BELL625 (-86)*
    12: VIDEOTRON4729 (-92)*
    13: BELL351 (-82)*
    14: VIDEOTRON4858 (-80)*
    15: Tony (-58)*
    16: 4D Systems (-58)*
    17: SasoDei (-86)*
    18: VIDEOTRON5907 (-90)*
    
    scan start
    scan done
    19 networks found
    1: BELL678 (-90)*
    2: BELL065 (-94)*
    3: VIRGIN932 (-96)*
    4: 4D Systems (-57)*
    5: VIDEOTRON4858 (-80)*
    6: VIDEOTRON1438 (-88)*
    7: Tony (-57)*
    8: Bravo2 (-86)*
    9: SasoDei (-88)*
    10: BELL625 (-86)*
    11: BELL649 (-83)*
    12: Gemstelecom08945 (-87)*
    13: DIRECT-16-HP OfficeJet 3830 (-90)*
    14: Ma Connexion (-80)*
    15: VIDEOTRON4729 (-92)*
    16: BELL171 (-90)*
    17: Primeconnect (-88)*
    18: VIDEOTRON5907 (-90)*
    19: BELL351 (-85)*
    
    scan start
    scan done
    17 networks found
    1: BELL857 (-92)*
    2: BELL678 (-89)*
    3: Tony (-58)*
    4: VIDEOTRON5907 (-88)*
    5: BELL351 (-85)*
    6: 4D Systems (-56)*
    7: SasoDei (-85)*
    8: BELL171 (-85)*
    9: VIDEOTRON4858 (-80)*
    10: BELL946 (-88)*
    11: Ma Connexion (-80)*
    12: BELL649 (-80)*
    13: BELL625 (-87)*
    14: VIDEOTRON4729 (-88)*
    15: Primeconnect (-89)*
    16: VIDEOTRON1438 (-84)*
    17: Bravo2 (-87)*
    
    scan start
    scan done
    17 networks found
    1: VIRGIN932 (-93)*
    2: 4D Systems (-57)*
    3: SasoDei (-84)*
    4: BELL171 (-86)*
    5: VIDEOTRON4858 (-84)*
    6: drahcir8 (-92)*
    7: Tony (-58)*
    8: VIDEOTRON5907 (-87)*
    9: BELL351 (-82)*
    10: CIK1000M_AC2.4G_9665 (-93)*
    11: VIDEOTRON1438 (-87)*
    12: Ma Connexion (-79)*
    13: BELL649 (-81)*
    14: Primeconnect (-85)*
    15: Primeconnect-guest (-82) 
    16: BELL946 (-86)*
    17: Bravo2 (-87)*
    
    scan start
    scan done
    17 networks found
    1: BELL678 (-89)*
    2: Tony (-56)*
    3: VIDEOTRON5907 (-90)*
    4: BELL351 (-85)*
    5: 4D Systems (-57)*
    6: SasoDei (-87)*
    7: VIDEOTRON4858 (-80)*
    8: BELL171 (-86)*
    9: VIDEOTRON1438 (-88)*
    10: Ma Connexion (-80)*
    11: BELL649 (-81)*
    12: Gemstelecom08945 (-88)*
    13: DIRECT-16-HP OfficeJet 3830 (-86)*
    14: BELL625 (-85)*
    15: BELL946 (-88)*
    16: Primeconnect (-84)*
    17: Bravo2 (-86)*
    
    scan start
    scan done
    17 networks found
    1: BELL678 (-88)*
    2: Caesar (-94)*
    3: 4D Systems (-59)*
    4: SasoDei (-87)*
    5: BELL171 (-88)*
    6: VIDEOTRON4858 (-79)*
    7: VIDEOTRON1438 (-87)*
    8: Tony (-57)*
    9: VIDEOTRON5907 (-88)*
    10: BELL351 (-84)*
    11: Ma Connexion (-77)*
    12: BELL649 (-81)*
    13: Gemstelecom08945 (-90)*
    14: DIRECT-16-HP OfficeJet 3830 (-89)*
    15: BELL625 (-87)*
    16: VIDEOTRON4729 (-90)*
    17: Bravo2 (-83)*
    
    scan start
    scan done
    15 networks found
    1: BELL678 (-90)*
    2: VIDEOTRON1438 (-90)*
    3: Tony (-62)*
    4: 4D Systems (-59)*
    5: BELL171 (-88)*
    6: VIDEOTRON4858 (-81)*
    7: VIDEOTRON5907 (-88)*
    8: SasoDei (-83)*
    9: Ma Connexion (-77)*
    10: BELL649 (-80)*
    11: VIDEOTRON4729 (-87)*
    12: Bravo2 (-87)*
    13: BELL846* (-85)*
    14: Primeconnect (-89)*
    15: BELL351 (-88)*
    
    scan start
    scan done
    15 networks found
    1: BELL678 (-87)*
    2: BELL351 (-84)*
    3: Bravo2 (-84)*
    4: VIDEOTRON4858 (-81)*
    5: VIDEOTRON5907 (-91)*
    6: BELL171 (-89)*
    7: BELL649 (-81)*
    8: Ma Connexion (-79)*
    9: Gemstelecom08945 (-90)*
    10: DIRECT-16-HP OfficeJet 3830 (-86)*
    11: 4D Systems (-57)*
    12: SasoDei (-84)*
    13: Primeconnect (-85)*
    14: Tony (-56)*
    15: VIDEOTRON1438 (-90)*
    
    scan start
    scan done
    13 networks found
    1: BELL678 (-92)*
    2: 4D Systems (-59)*
    3: VIDEOTRON4858 (-84)*
    4: VIDEOTRON1438 (-89)*
    5: Tony (-58)*
    6: SasoDei (-92)*
    7: CIK1000M_AC2.4G_9665 (-94)*
    8: Bravo2 (-89)*
    9: BELL430 (-93)*
    10: Ma Connexion (-78)*
    11: BELL649 (-80)*
    12: Primeconnect (-87)*
    13: BELL351 (-84)*
    
    scan start
    scan done
    14 networks found
    1: BELL678 (-90)*
    2: 4D Systems (-57)*
    3: SasoDei (-89)*
    4: VIDEOTRON4858 (-81)*
    5: VIDEOTRON1438 (-85)*
    6: Tony (-57)*
    7: BELL351 (-83)*
    8: CIK1000M_AC2.4G_9665 (-92)*
    9: Ma Connexion (-81)*
    10: Gemstelecom08945 (-90)*
    11: BELL649 (-83)*
    12: VIDEOTRON4729 (-91)*
    13: Primeconnect-guest (-86) 
    14: Bravo2 (-85)*
    
    scan start
    scan done
    16 networks found
    1: BELL678 (-90)*
    2: VIDEOTRON4858 (-81)*
    3: SasoDei (-89)*
    4: VIDEOTRON5907 (-91)*
    5: BELL351 (-91)*
    6: 4D Systems (-63)*
    7: Tony (-60)*
    8: Gemstelecom08945 (-87)*
    9: BELL649 (-85)*
    10: DIRECT-16-HP OfficeJet 3830 (-89)*
    11: BELL625 (-91)*
    12: Primeconnect (-89)*
    13: Primeconnect-guest (-85) 
    14: VIDEOTRON1438 (-90)*
    15: Bravo2 (-89)*
    16: BELL171 (-95)*
    
    scan start
    scan done
    16 networks found
    1: BELL678 (-90)*
    2: Caesar (-92)*
    3: Tony (-59)*
    4: BELL351 (-84)*
    5: 4D Systems (-59)*
    6: BELL171 (-87)*
    7: Ma Connexion (-80)*
    8: BELL649 (-77)*
    9: DIRECT-16-HP OfficeJet 3830 (-91)*
    10: Gemstelecom08945 (-88)*
    11: Bravo2 (-86)*
    12: Primeconnect (-88)*
    13: VIDEOTRON1438 (-89)*
    14: VIDEOTRON4858 (-81)*
    15: VIDEOTRON5907 (-91)*
    16: SasoDei (-87)*
    
    scan start
    scan done
    16 networks found
    1: DIRECT-84-HP ENVY 4520 series (-92)*
    2: BELL678 (-86)*
    3: Bravo2 (-87)*
    4: BELL171 (-87)*
    5: 4D Systems (-61)*
    6: VIDEOTRON1438 (-90)*
    7: Tony (-63)*
    8: Ma Connexion (-80)*
    9: BELL649 (-82)*
    10: DIRECT-16-HP OfficeJet 3830 (-87)*
    11: Gemstelecom08945 (-90)*
    12: SasoDei (-88)*
    13: Primeconnect (-83)*
    14: BELL351 (-81)*
    15: VIDEOTRON4858 (-80)*
    16: VIDEOTRON5907 (-92)*
    
    scan start
    scan done
    14 networks found
    1: SasoDei (-88)*
    2: VIDEOTRON5907 (-88)*
    3: BELL351 (-82)*
    4: Bravo2 (-86)*
    5: VIDEOTRON4858 (-82)*
    6: 4D Systems (-57)*
    7: Ma Connexion (-80)*
    8: BELL649 (-78)*
    9: Gemstelecom08945 (-88)*
    10: Tony (-56)*
    11: Primeconnect-guest (-86) 
    12: Primeconnect (-81)*
    13: BELL171 (-89)*
    14: VIDEOTRON1438 (-83)*
    
    scan start
    scan done
    14 networks found
    1: Tony (-58)*
    2: Bravo2 (-86)*
    3: SasoDei (-84)*
    4: VIDEOTRON1438 (-79)*
    5: CIK1000M_AC2.4G_9665 (-93)*
    6: Ma Connexion (-86)*
    7: DIRECT-16-HP OfficeJet 3830 (-93)*
    8: Gemstelecom08945 (-87)*
    9: BELL649 (-81)*
    10: BELL625 (-86)*
    11: BELL351 (-86)*
    12: Primeconnect (-84)*
    13: VIDEOTRON4858 (-81)*
    14: 4D Systems (-57)*
    
    scan start
    scan done
    17 networks found
    1: VIDEOTRON1438 (-90)*
    2: BELL351 (-85)*
    3: BELL171 (-88)*
    4: Tony (-58)*
    5: CIK1000M_AC2.4G_9665 (-91)*
    6: 4D Systems (-59)*
    7: SasoDei (-83)*
    8: Ma Connexion (-85)*
    9: BELL649 (-79)*
    10: DIRECT-16-HP OfficeJet 3830 (-90)*
    11: Gemstelecom08945 (-89)*
    12: BELL625 (-88)*
    13: VIDEOTRON4729 (-92)*
    14: Bravo2 (-87)*
    15: Primeconnect (-84)*
    16: VIDEOTRON5907 (-90)*
    17: VIDEOTRON4858 (-83)*
    
    scan start
    scan done
    14 networks found
    1: BELL171 (-91)*
    2: 4D Systems (-60)*
    3: VIDEOTRON4858 (-83)*
    4: VIDEOTRON1438 (-89)*
    5: SasoDei (-88)*
    6: CIK1000M_AC2.4G_9665 (-91)*
    7: Bravo2 (-86)*
    8: VIDEOTRON4729 (-92)*
    9: Gemstelecom08945 (-86)*
    10: BELL649 (-79)*
    11: BELL625 (-90)*
    12: Tony (-57)*
    13: Primeconnect (-86)*
    14: BELL351 (-87)*
    
    scan start
    scan done
    20 networks found
    1: BELL678 (-89)*
    2: VIRGIN932 (-95)*
    3: 4D Systems (-59)*
    4: VIDEOTRON4858 (-81)*
    5: Tony (-57)*
    6: BELL351 (-85)*
    7: BELL545 (-89)*
    8: BELL171 (-89)*
    9: CIK1000M_AC2.4G_9665 (-90)*
    10: VIDEOTRON5907 (-91)*
    11: SasoDei (-86)*
    12: Ma Connexion (-84)*
    13: BELL649 (-79)*
    14: Gemstelecom08945 (-88)*
    15: DIRECT-16-HP OfficeJet 3830 (-93)*
    16: BELL625 (-88)*
    17: VIDEOTRON1438 (-84)*
    18: Primeconnect (-86)*
    19: BELL846* (-87)*
    20: Primeconnect-guest (-86) 
    
    scan start
    scan done
    18 networks found
    1: Bravo2 (-88)*
    2: 4D Systems (-59)*
    3: SasoDei (-87)*
    4: Tony (-61)*
    5: VIDEOTRON1438 (-84)*
    6: Ma Connexion (-84)*
    7: BELL649 (-80)*
    8: Gemstelecom08945 (-87)*
    9: DIRECT-16-HP OfficeJet 3830 (-91)*
    10: VIDEOTRON4729 (-94)*
    11: BELL625 (-90)*
    12: BELL351 (-89)*
    13: BELL171 (-89)*
    14: Primeconnect (-89)*
    15: Primeconnect-guest (-83) 
    16: VIDEOTRON4858 (-84)*
    17: BELL946 (-89)*
    18: VIDEOTRON5907 (-93)*
    
    scan start
    scan done
    15 networks found
    1: VIDEOTRON1438 (-85)*
    2: Tony (-59)*
    3: VIDEOTRON5907 (-91)*
    4: BELL171 (-87)*
    5: 4D Systems (-56)*
    6: SasoDei (-84)*
    7: VIDEOTRON4858 (-79)*
    8: Ma Connexion (-81)*
    9: DIRECT-16-HP OfficeJet 3830 (-87)*
    10: BELL649 (-80)*
    11: BELL625 (-86)*
    12: VIDEOTRON4729 (-92)*
    13: Gemstelecom08945 (-87)*
    14: Bravo2 (-84)*
    15: BELL351 (-89)*
    
    scan start
    scan done
    17 networks found
    1: BELL678 (-92)*
    2: BELL351 (-90)*
    3: Bravo2 (-90)*
    4: VIDEOTRON4858 (-81)*
    5: VIDEOTRON5907 (-91)*
    6: CIK1000M_AC2.4G_9665 (-88)*
    7: BELL545 (-91)*
    8: Ma Connexion (-81)*
    9: BELL649 (-80)*
    10: Gemstelecom08945 (-87)*
    11: BELL946 (-88)*
    12: 4D Systems (-57)*
    13: SasoDei (-86)*
    14: Primeconnect (-86)*
    15: Tony (-58)*
    16: VIDEOTRON1438 (-87)*
    17: BELL171 (-90)*
    
    scan start
    scan done
    18 networks found
    1: BELL678 (-90)*
    2: VIDEOTRON4858 (-83)*
    3: VIDEOTRON5907 (-90)*
    4: BELL351 (-88)*
    5: Bravo2 (-87)*
    6: SasoDei (-88)*
    7: Ma Connexion (-80)*
    8: DIRECT-16-HP OfficeJet 3830 (-90)*
    9: BELL649 (-80)*
    10: BELL625 (-87)*
    11: VIDEOTRON4729 (-90)*
    12: Gemstelecom08945 (-88)*
    13: Tony (-58)*
    14: 4D Systems (-59)*
    15: Primeconnect-guest (-85) 
    16: Primeconnect (-86)*
    17: VIDEOTRON1438 (-86)*
    18: BELL171 (-92)*
    
    scan start
    scan done
    14 networks found
    1: BELL678 (-90)*
    2: Bravo2 (-85)*
    3: VIDEOTRON1438 (-90)*
    4: BELL351 (-83)*
    5: Ma Connexion (-80)*
    6: BELL649 (-87)*
    7: DIRECT-16-HP OfficeJet 3830 (-88)*
    8: Gemstelecom08945 (-87)*
    9: VIDEOTRON4858 (-83)*
    10: Primeconnect-guest (-89) 
    11: VIDEOTRON5907 (-91)*
    12: SasoDei (-90)*
    13: Tony (-60)*
    14: 4D Systems (-61)*
    
    scan start
    scan done
    14 networks found
    1: BELL678 (-89)*
    2: Bravo2 (-85)*
    3: 4D Systems (-62)*
    4: SasoDei (-88)*
    5: VIDEOTRON1438 (-93)*
    6: Tony (-62)*
    7: BELL649 (-85)*
    8: Ma Connexion (-78)*
    9: DIRECT-16-HP OfficeJet 3830 (-93)*
    10: Gemstelecom08945 (-87)*
    11: Primeconnect (-88)*
    12: BELL171 (-93)*
    13: VIDEOTRON4858 (-82)*
    14: BELL351 (-82)*
    
    scan start
    scan done
    15 networks found
    1: BELL678 (-88)*
    2: 4D Systems (-61)*
    3: SasoDei (-92)*
    4: VIDEOTRON4858 (-84)*
    5: Tony (-60)*
    6: CIK1000M_AC2.4G_9665 (-93)*
    7: VIDEOTRON1438 (-85)*
    8: VIDEOTRON5907 (-91)*
    9: BELL351 (-82)*
    10: BELL171 (-92)*
    11: Ma Connexion (-79)*
    12: BELL649 (-83)*
    13: Gemstelecom08945 (-86)*
    14: Primeconnect (-90)*
    15: Bravo2 (-86)*
    
    scan start
    scan done
    15 networks found
    1: BELL678 (-92)*
    2: VIDEOTRON1438 (-90)*
    3: Bravo2 (-88)*
    4: BELL171 (-92)*
    5: CIK1000M_AC2.4G_9665 (-93)*
    6: BELL351 (-81)*
    7: Ma Connexion (-79)*
    8: BELL649 (-80)*
    9: BELL430 (-90)*
    10: VIDEOTRON4858 (-79)*
    11: Primeconnect (-86)*
    12: Primeconnect-guest (-85) 
    13: Tony (-60)*
    14: 4D Systems (-61)*
    15: SasoDei (-93)*
    
    scan start
    scan done
    13 networks found
    1: BELL678 (-93)*
    2: Tony (-54)*
    3: BELL351 (-84)*
    4: SasoDei (-86)*
    5: 4D Systems (-55)*
    6: VIDEOTRON4858 (-79)*
    7: VIDEOTRON1438 (-84)*
    8: Gemstelecom08945 (-88)*
    9: BELL649 (-79)*
    10: Ma Connexion (-78)*
    11: Primeconnect-guest (-88) 
    12: Bravo2 (-87)*
    13: VIDEOTRON5907 (-90)*
    
    scan start
    scan done
    16 networks found
    1: BELL678 (-92)*
    2: Tony (-57)*
    3: BELL351 (-84)*
    4: 4D Systems (-56)*
    5: VIDEOTRON4858 (-79)*
    6: VIDEOTRON5907 (-92)*
    7: VIDEOTRON1438 (-88)*
    8: Ma Connexion (-79)*
    9: BELL649 (-82)*
    10: DIRECT-16-HP OfficeJet 3830 (-90)*
    11: Gemstelecom08945 (-88)*
    12: BELL171 (-88)*
    13: SasoDei (-83)*
    14: BELL946 (-89)*
    15: Bravo2 (-86)*
    16: BELL545 (-90)*
    
    scan start
    scan done
    17 networks found
    1: BELL678 (-88)*
    2: BELL857 (-93)*
    3: Caesar (-92)*
    4: Bravo2 (-88)*
    5: BELL171 (-91)*
    6: 4D Systems (-58)*
    7: SasoDei (-85)*
    8: VIDEOTRON4858 (-83)*
    9: VIDEOTRON1438 (-84)*
    10: Tony (-58)*
    11: BELL545 (-87)*
    12: Gemstelecom08945 (-88)*
    13: Ma Connexion (-79)*
    14: BELL649 (-81)*
    15: Primeconnect (-87)*
    16: BELL351 (-86)*
    17: VIDEOTRON5907 (-90)*
    
    scan start
    scan done
    14 networks found
    1: VIDEOTRON1438 (-91)*
    2: Tony (-60)*
    3: BELL545 (-94)*
    4: Bravo2 (-91)*
    5: 4D Systems (-59)*
    6: CIK1000M_AC2.4G_9665 (-93)*
    7: Ma Connexion (-83)*
    8: BELL649 (-84)*
    9: Gemstelecom08945 (-90)*
    10: BELL171 (-93)*
    11: BELL351 (-84)*
    12: Primeconnect-guest (-90) 
    13: VIDEOTRON4858 (-82)*
    14: VIDEOTRON5907 (-90)*
    
    scan start
    scan done
    16 networks found
    1: BELL857 (-91)*
    2: BELL587 (-91)*
    3: VIDEOTRON1438 (-88)*
    4: Tony (-58)*
    5: VIDEOTRON5907 (-88)*
    6: BELL351 (-82)*
    7: 4D Systems (-58)*
    8: VIDEOTRON4858 (-77)*
    9: SasoDei (-84)*
    10: Ma Connexion (-81)*
    11: DIRECT-16-HP OfficeJet 3830 (-91)*
    12: Gemstelecom08945 (-87)*
    13: BELL649 (-81)*
    14: BELL171 (-91)*
    15: Bravo2 (-89)*
    16: BELL545 (-93)*
    
    scan start
    scan done
    15 networks found
    1: BELL678 (-89)*
    2: Bravo2 (-86)*
    3: BELL171 (-88)*
    4: 4D Systems (-61)*
    5: VIDEOTRON1438 (-83)*
    6: CIK1000M_AC2.4G_9665 (-88)*
    7: BELL649 (-78)*
    8: DIRECT-16-HP OfficeJet 3830 (-86)*
    9: Ma Connexion (-85)*
    10: BELL625 (-87)*
    11: BELL351 (-84)*
    12: VIDEOTRON4858 (-79)*
    13: Tony (-59)*
    14: SasoDei (-83)*
    15: VIDEOTRON5907 (-89)*
    the video for the above code running on teensy is here: https://www.youtube.com/watch?v=oK2DiuyKvjA


    Looks like a dual teensy&esp controller with transparency functions of the ESP on the Teensy!

    But wait, theres more!

    I've imported function control transparency to give the teensy additional use of the ESP.

    Libraries I worked on and transferred control over to teensy:
    ESP8266WiFiSTA.h
    ESP8266WiFiScan.h
    ESP8266WiFiMulti.h
    ESP8266WiFiAP.h
    ESP8266WiFiGeneric.h
    ESP8266WiFiType.h
    WiFiClient.h
    WiFiUdp.h

    Most of if not all of the functions can be ran as-is on teensy with the stock return values of the ESP. This gives the ability to connect to websites, send UDP packets (even listen for packets udp ex Udp.begin(8266) ).
    using WifiMulti you have the addAP and run functions as well


    heres quite a list of the functions i placed in the code to do all this!
    Code:
    // NATIVE ESP8266 TRANSPARENCY COMMANDS
    
        virtual int availableForWrite();
        virtual size_t peekBytes(uint8_t *buffer, size_t length);
        size_t peekBytes(char *buffer, size_t length) {
          return peekBytes((uint8_t *) buffer, length);
        }
        // STATUS AND LOCAL IP NEED SEPARATE SCOPE, 2 LIBRARIES USE THEM!
    
        // ESP8266WIFISTA.H
        // begin() --> shared with above functions
        virtual uint8_t   status();
        virtual IPAddress subnetMask();
        virtual IPAddress gatewayIP();
        virtual IPAddress dnsIP(uint8_t dns_no = 0);
        virtual String    SSID();
        virtual String    psk();
        virtual String    BSSIDstr();
        virtual int32_t   RSSI();
        virtual String    macAddress();
        virtual String hostname();
        virtual bool hostname(char* aHostname);
        virtual bool hostname(const char* aHostname);
        virtual bool hostname(String aHostname);
        virtual bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000);
        virtual bool      isConnected();
        virtual uint8_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
        virtual uint8_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
        virtual bool      disconnect(bool wifioff = false);
        virtual bool      reconnect();
        virtual bool      setAutoConnect(bool autoConnect);
        virtual bool      getAutoConnect();
        virtual bool      setAutoReconnect(bool autoReconnect);
        virtual uint8_t   waitForConnectResult();
        virtual IPAddress localIP();
    
    
        // ESP8266WIFISCAN.H
        virtual uint16_t  scanNetworks();
        virtual int32_t RSSI(uint8_t networkItem);
        virtual String BSSIDstr(uint8_t networkItem);
        virtual int32_t channel(uint8_t networkItem);
        virtual bool isHidden(uint8_t networkItem);
        virtual String    SSID(uint8_t s);
        virtual uint8_t encryptionType(uint8_t networkItem);
    
    
        // ESP8266WIFIAP.H
        virtual String softAPmacAddress(void);
        virtual IPAddress softAPIP();
        virtual uint8_t softAPgetStationNum();
        virtual bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
        virtual bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
        virtual bool softAPdisconnect(bool wifioff = false);
    
    
        // ESP8266WIFIGENERIC.H
        virtual bool persistent(bool persistent);
        virtual bool setOutputPower(float dBm);
        virtual bool enableSTA(bool enable);
        virtual bool enableAP(bool enable);
        virtual bool forceSleepBegin(uint32_t sleepUs = 0);
        virtual bool forceSleepWake();
        virtual bool mode(uint8_t m);
        virtual uint8_t getMode();
        virtual bool getPersistent();
        virtual int  hostByName(const char* aHostname, IPAddress& aResult);
        virtual int  hostByName(const char* aHostname, IPAddress& aResult, uint32_t timeout_ms);
        virtual bool setPhyMode(uint8_t mode);
        virtual uint8_t getSleepMode();
        virtual bool setSleepMode(uint8_t type);
        virtual uint8_t getPhyMode();
        virtual int32_t channel(void);
    
    
        // WIFICLIENT.H
        // Stream classes: flush, read, write, write buf, peek, available, peekbytes, read buf,availableForWrite
       // virtual uint8_t   status();
        virtual int  connect(IPAddress ip, uint16_t port);
        virtual int  connect(const char *host, uint16_t port);
        virtual bool getNoDelay();
        virtual bool setNoDelay(bool nodelay);
        virtual uint8_t connected();
        virtual bool stop();
        virtual bool stopAll();
        virtual IPAddress remoteIP();
        virtual uint16_t remotePort();
        virtual uint16_t localPort();
        //virtual IPAddress localIP();
        virtual int read(uint8_t *buf, size_t size);
    
    
        // ESP8266WIFIMULTI.H
        virtual bool addAP(const char* ssid, const char *passphrase = NULL);
        virtual uint8_t run(void); // wl_status_t
    
    
        // WIFIUDP.H
        // virtual uint8_t begin(uint16_t port);
        // STOP, STOPALL, BEGIN, REMOTEIP, REMOTEPORT ARE SHARED FUNCTIONS!
        virtual uint8_t beginMulticast(IPAddress interfaceAddr, IPAddress multicast, uint16_t port); 
        virtual int beginPacket(IPAddress ip, uint16_t port);
        virtual int beginPacket(const char *host, uint16_t port);
        virtual int beginPacketMulticast(IPAddress multicastAddress, uint16_t port, IPAddress interfaceAddress, int ttl = 1);
        virtual int endPacket();
        virtual int parsePacket();
        virtual IPAddress destinationIP();
        // PEEK, WRITE BUF, WRITE, AVAILABLE, READ, READ BUF, FLUSH
    there may be more implemented or not listed as sometimes i loose track, but the ones posted above definately run well.

    Here is the compilation info for Teensy 3.6 for the library project im working on of WifiScan.ino demo that comes from ESP branch:

    Code:
    Sketch uses 148012 bytes (14%) of program storage space. Maximum is 1048576 bytes.
    Global variables use 13184 bytes (5%) of dynamic memory, leaving 248960 bytes for local variables. Maximum is 262144 bytes.
    Here is the current ESP compilation of the 2-way communication link i worked on, with both ends running at 1Megabaud uart rates for teensy <-> esp links:

    Code:
    Sketch uses 368807 bytes (35%) of program storage space. Maximum is 1044464 bytes.
    Global variables use 39756 bytes (48%) of dynamic memory, leaving 42164 bytes for local variables. Maximum is 81920 bytes.

    heres the video of the esp as standalone running the uart display controlled from a teensy 3.6 over IP, library supports serial writes and buffered writes, Ive demo'd the buffered writes to send the 6 byte payload including crc to the display which is fast

    https://www.youtube.com/watch?v=cWpr6U_bRX8

    here is the demo using single byte transmission over IP

    https://www.youtube.com/watch?v=H0WUIRmC868

    What I'd like to implement is, currently, it supports sending dynamic payloads to the teensy handler at other end of the link, I'd like to change that behaviour, or perhaps, overload the call with a reference instead. It's simple really, you could send a 400 byte payload buffer to your teensy at the other end of the link as a reference, the user can edit the array (perhaps with sensor values) and when the function exits, the array is returned back to the main teensy. single packet to send, single to receive, very efficient. storing sensor data in the buffer would be handy for remote monitoring purposes as the updated contents are returned.

    current handler:

    Code:
    void hndl(const uint8_t *buf, size_t size) {
      for ( uint16_t i = 0; i < size; i++ ) Serial.print((char)buf[i]); Serial.println();
    }
    when scope exits, library sends back an ACK to main teensy immediately.

    but don't let this idea discourage you. Remember I said it was multi master? You can send your own payload from the OTHER end of the link to the IP of the intended master.
    as per previously referenced video, shows both teensies connecting to each other and controlling each others leds using the same identical libraries on teensy, and identical code on both esps:
    https://www.youtube.com/watch?v=RuPVjO1DDnY

    YOU decide where your data goes, no need to reflash a location if you need to change data paths

    Tony
    Last edited by tonton81; 12-21-2017 at 09:04 PM.

  18. #43
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    I decided to setup 2 esps's using 2 class constructors between them:

    teensywifi_controller eSerial = teensywifi_controller("ESP_Serial", &Serial1, "192.168.2.175:80");
    teensywifi_controller eFL = teensywifi_controller("ESPFASTLED", &Serial1, "192.168.2.168:80");

    pay attention to the IP in the constructor, this will make the teensy 3.6's esp change to the proper endpoint whenever that object is used:

    so, eSerial.x will automatically switch to it's pre-assigned IP, no need for a user to do it.
    eFL will switch to the fastled designated controller's IP

    in this demo, its a test of just standalone espendpoints, to demonstrate that the esp can work with, or without teensy attached. But also be aware, the ESP can also run as standalone with a teensy attached. So we could use the ESP's SPI/I2C bus or GPIO and also teensy ports as well, except you CANT use UART of esp with teensy attached obviously, but in standalone mode (auto switched as well by the class), you can run uart devices off standalone esp's as well.

    https://www.youtube.com/watch?v=5vVHGe-XpDw

    the lcd is using write buffer serial payloads, and fastled is sending it's stream of ~ 450 bytes over a single tcp socket packet

    you would get better performance if you ran a teensy attached as the esp has to switch between controlling fasted and the display, and leave the wifi handling to the ESP

  19. #44
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    I forgot to remove the 500ms delay between socket switching, heres the updated video without delays in socket switching:

    https://www.youtube.com/watch?v=HYBeeOeiO9c

  20. #45
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    2,711
    alright, im going to be working on the MQTT version of the esp8266 with teensy, anyone got any suggestions for a topic name for the teensy controller, i plan to add individual teensy controls as well as mass control capability (ex, changing states on multiple subscribers at same time). for the current i2c,spi,websocket versions i plan to start a new thread by friday to post them, documentation will be very limited to a brief of this entire thread i guess, but examples will be given to start you off on them.... i worked very hard on them...

    for the mqtt version,

    i will need a name suggestion, it will be based on teensy hardware and for the pjrc forums, it will be the control topic that the controllers use to communicate with each other, or in a symmetrical combined state (broadcast control support). i also plan to give the user same functionality as my websocket version, which is full esp control locally of native functions in transparency mode, so that in itself will take time too. i will be using the mosquitto server on my desktop pc for the tests and it will be using user/pass authentication as well for each teensy client. as usual i plan transparency, as in teensy will assign the wifi user/pass, as well as the mqtt server, port, and the mqtt_name. nothing will need to be hard coded to the esp code as i plan things out. i will probably add a grouping array for running several teensies in sync mode (ex send fastled packet to 5 teensies at same time with a single mqtt packet), or probably just let it be defined to the users topic set have the group included ex. teensy/group1

    as im still new to mqtt, and quite frankly, i should have started there before working on my websocket version after the research i did today, any suggestions are welcome. and since tomorrow is my bday lol i will be the one giving the gift of my hard work to pjrc for my last 3 project runs while i tackle the mqtt one

    Tony

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •