GithubHelp home page GithubHelp logo

datasith / ai_tips_esp8266 Goto Github PK

View Code? Open in Web Editor NEW
186.0 25.0 140.0 1.18 MB

Code from my "ESP8266 Tips & Tricks" tutorial series on YouTube

Home Page: https://www.youtube.com/playlist?list=PLNFq0T6Z3JPsHwzvPQncip-kMIdWpnnip

License: Other

Python 2.61% HTML 3.49% C++ 93.90%
arduino esp8266 esp8266-arduino

ai_tips_esp8266's Introduction

datasith

Yo, I'm Cisco @datasith

• I am a Data Scientist

• My background is a mix of electrical engineering, robotics, and computer vision

• My current interest lie on architecting computer vision solutions for geospatial applications

• I (used to) run a YouTube channel to teach *anyone* about DIY Electronics and Data Science

• When I'm not coding (if ever), I enjoy running 🏃 snowboarding 🏂 boxing 🥊 and watching/playing fútbol ⚽

Gmail Badge LinkedIn Kaggle Twitter YouTube Resume Website

Projects

🤖 Studying Robot-Fly Visual Interactions

Together with @peterpolidoro, we built a real-time, vision-based controlled, XY-stage to move a magnet within a chamber to study visually mediated responses of walking fruit flies.

Publications:

Flyatar Robot-Fly Interactions Rig

🦟 Tracking Insect Wings and Body Kinematics

I built a 3D, high-speed video, auto-capture rig to observe visually mediated responses of fruit flies. The responses were elicited by a self-triggered LED chamber surrounding the flight volume.

Publications:

Flytrax Motion Capture Rig

🏎️ Team Caltech - DARPA Urban Challenge

Together with fellow students, post-docs, and professors, we built an autonomous ground vehicle capable of maneuvering a 60 mile course in a mock urban environment in under 6 hours.

Publications:

Articles:

Team Caltech at DGC '08

Tools and Tech

• Languages
• Platforms
• Utilities

ai_tips_esp8266's People

Contributors

datasith avatar hzwdachui avatar jackrsteiner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ai_tips_esp8266's Issues

Web API access

Hello!
I try to make the Web API access example from your YouTube Video with the esp8266.
https://www.youtube.com/watch?v=8xqgdXvn3yw&t=607s
Want to modify it to work with my OpenWeatherMap account.
Maybe you can help me with this. Thanks in Advance!
Andreas
Code is attached …. also the Json Output of the OWM

/*------------------------------------------------------------------------------
  11/01/2016
  Author: Makerbro
  Platforms: ESP8266
  Language: C++/Arduino
  File: simple_client.ino
  ------------------------------------------------------------------------------
  Description: 
  Code for YouTube video demonstrating how to run a web client on the ESP8266 to
  get Weather Data from the Weather Underground API:
  https://youtu.be/Edbxyl2BhyU
  
  Do you like my videos? You can support the channel:
  https://patreon.com/acrobotic
  https://paypal.me/acrobotic
  ------------------------------------------------------------------------------
  Please consider buying products from ACROBOTIC to help fund future
  Open-Source projects like this! We'll always put our best effort in every
  project, and release all our design files and code for you to use. 

  https://acrobotic.com/
  https://amazon.com/acrobotic
  ------------------------------------------------------------------------------
  License:
  Please see attached LICENSE.txt file for details.
------------------------------------------------------------------------------*/
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ArduinoJson.h>

ESP8266WebServer server;
uint8_t pin_led = 16;
char* ssid = "WLAN-MYWLAN";
char* password = "MYPSWD_ABRACADABRA";

#define WU_API_KEY "MY_OPENWEATHERMAP_APIKEY"
#define WU_LOCATION "2916936"   **_// CITY ID CODE_OF MY CITY IN **GERMANY****
#define WU_URL "api.openweathermap.org"

static char respBuffer[4096];

void setup()
{
  pinMode(pin_led, OUTPUT);
  WiFi.begin(ssid,password);
  Serial.begin(115200);
  while(WiFi.status()!=WL_CONNECTED)
  {
    Serial.print(".");
    delay(500);
  }
  Serial.println("");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());

  server.on("/",[](){server.send(200,"text/plain","Hello simple client!");});
  server.on("/getdata",getData);
  server.begin();
}

void loop()
{
  server.handleClient();
}

WiFiClient client;

void getData()
{
  const char request[] = 
** I THINK HERE IS THE PROBLEM WITH THE WORKING WITH THE :JSON RESPOND FROM THE OWM SERVER **
    "GET /data/2.5/weather?id=" WU_LOCATION "&appid=" WU_API_KEY " HTTP/1.1\r\n"  
    "User-Agent: ESP8266/0.1\r\n"
    "Accept: */*\r\n"
    "Host: " WU_URL "\r\n"
    "Connection: close\r\n"
    "\r\n";
  Serial.println(request);
  client.connect(WU_URL, 80);
  client.print(request);
  client.flush();
  delay(1000);

  uint16_t index = 0;
  while(client.connected())
  {
    if(client.available())
    {
      respBuffer[index++] = client.read();
      delay(1);
    }
  }
  client.stop();
  char * json = strchr(respBuffer,'{');

  DynamicJsonBuffer jBuffer;
  JsonObject& root = jBuffer.parseObject(json);
  JsonObject& current = root["weather"];
  String weather = current["description"];
  JsonObject& current = root["main"];
  String temp_c = current["temp"];
  String msg = "Temp(C): "+(temp_c -273,15)+", Weather: "+weather;
  server.send(200,"text/plain", msg);
}

JSON RESPOND FROM OWM SERVER:

{
  "indent_size": "4",
  "indent_char": " ",
  "max_preserve_newlines": "5",
  "preserve_newlines": true,
  "keep_array_indentation": false,
  "break_chained_methods": false,
  "indent_scripts": "normal",
  "brace_style": "collapse",
  "space_before_conditional": true,
  "unescape_strings": false,
  "jslint_happy": false,
  "end_with_newline": false,
  "wrap_line_length": "0",
  "indent_inner_html": false,
  "comma_first": false,
  "e4x": false,
  "indent_empty_lines": false
}

No Nodemcu .bin file in since 1.4 release

So I'm going through the tutorial since the video skips way ahead of someone who is starting out.

One of the steps for Flashing the firmware to the ESP8266 python esptool.py --port /dev/tty.SLAB_USBtoUART write_flash 0x00000 ~/Downloads/nodemcu_float_0.9.6-dev_20150704.bin

Problem is the, there is no .bin file in the latest release
screen shot 2017-06-11 at 9 42 29 pm

However in the example in the tutorial:

screen shot 2017-06-11 at 9 43 20 pm

You can see there is a .bin file available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.