flippity flip
This commit is contained in:
parent
bee479d6e9
commit
76f049e4c1
2 changed files with 51 additions and 3 deletions
|
@ -3,8 +3,8 @@
|
|||
#include <SmingCore/HardwareTimer.h>
|
||||
#include "SerialReadingDelegateDemo.h"
|
||||
|
||||
const int MOTOR_ON = 4;
|
||||
const int DATA_TX = 2;
|
||||
const int MOTOR_ON = 2;
|
||||
const int DATA_TX = 4;
|
||||
|
||||
Timer procTimer;
|
||||
|
||||
|
@ -21,7 +21,7 @@ private:
|
|||
int wpos = 0;
|
||||
int rpos = 0;
|
||||
|
||||
Hardware_Timer bitTimer;
|
||||
Timer bitTimer;
|
||||
|
||||
int pin;
|
||||
|
||||
|
@ -93,6 +93,7 @@ public:
|
|||
instance = this;
|
||||
bitTimer.initializeMs(rxtime, *[]() {
|
||||
// FIXME
|
||||
//Serial.write('!');
|
||||
if (SoftwareSerial::instance) {
|
||||
SoftwareSerial::instance->feedBit();
|
||||
}
|
||||
|
@ -122,6 +123,8 @@ SoftwareSerial tty;
|
|||
int clientcount = 0;
|
||||
|
||||
void tcpServerClientConnected (TcpClient* client) {
|
||||
System.setCpuFrequency(eCF_160MHz);
|
||||
|
||||
if (clientcount == 0) {
|
||||
tty.begin(DATA_TX, 20);
|
||||
}
|
||||
|
|
45
include/user_config.h
Normal file
45
include/user_config.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef __USER_CONFIG_H__
|
||||
#define __USER_CONFIG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// UART config
|
||||
#define SERIAL_BAUD_RATE COM_SPEED_SERIAL
|
||||
|
||||
// ESP SDK config
|
||||
#define LWIP_OPEN_SRC
|
||||
#define USE_US_TIMER
|
||||
|
||||
// Default types
|
||||
#define __CORRECT_ISO_CPP_STDLIB_H_PROTO
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Override c_types.h include and remove buggy espconn
|
||||
#define _C_TYPES_H_
|
||||
#define _NO_ESPCON_
|
||||
|
||||
// Updated, compatible version of c_types.h
|
||||
// Just removed types declared in <stdint.h>
|
||||
#include <espinc/c_types_compatible.h>
|
||||
|
||||
// System API declarations
|
||||
#include <esp_systemapi.h>
|
||||
|
||||
// C++ Support
|
||||
#include <esp_cplusplus.h>
|
||||
// Extended string conversion for compatibility
|
||||
#include <stringconversion.h>
|
||||
// Network base API
|
||||
#include <espinc/lwip_includes.h>
|
||||
|
||||
// Beta boards
|
||||
#define BOARD_ESP01
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue