This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket # Import socket module | |
s = socket.socket() # Create a socket object | |
host = "1somehing.11somehing." #Ip address that the TCPServer is there | |
port = 50000 # Reserve a port for your service every new transfer wants a new port or you must wait. | |
s.connect((host, port)) | |
s.send("Hello server!") | |
with open('received_file', 'wb') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "variant.cpp" | |
PinDescription g_APinDescription[TOTAL_GPIO_PIN_NUM]= | |
{ | |
{PB_2, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D0 | |
{PB_1, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D1 | |
{PB_3, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D2 | |
{PB_31, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D3 | |
{PB_30, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D4 | |
{PB_28, NOT_INITIAL, PIO_GPIO | PIO_GPIO_IRQ , NOT_INITIAL}, //D5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Export bin | |
recipe.hooks.objcopy.postobjcopy.1.pattern=xcopy {runtime.tools.ameba_d_tools.path}\km0_km4_image2.bin {build.path} | |
recipe.hooks.objcopy.postobjcopy.1.pattern.windows=xcopy {runtime.tools.ameba_d_tools.path}\km0_km4_image2.bin {build.path} | |
recipe.hooks.objcopy.postobjcopy.1.pattern.linux=cp {runtime.tools.ameba_d_tools.path}/km0_km4_image2.bin {build.path} | |
recipe.hooks.objcopy.postobjcopy.1.pattern.macosx=cp {runtime.tools.ameba_d_tools.path}/km0_km4_image2.bin {build.path} | |
recipe.output.tmp_file=km0_km4_image2.bin | |
recipe.output.save_file=km0_km4_image2.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comment the following line to disable DEBUG log | |
#define __DEBUG__ | |
#ifdef __DEBUG__ | |
// You should only uncomment 1 version at a time! | |
// Version 1 | |
//#define DEBUG(...) Serial.println(__VA_ARGS__) | |
// Version 2 | |
#define DEBUG(...) Serial.println(__VA_ARGS__); \ | |
Serial.print(" @ [SRC]: "); \ |