Skip to main content

Posts

Showing posts from March, 2018

Star Wars ASCIImation with Python - Windows

In this post, we'll watch a Star Wars movie in ASCII format. The only thing we need for this demo is Python-installed PC and internet connection. Figure : Screenshots from Python Command line while Star Wars is being streamed All credits gained in this demo will go to " blinkenlights.nl " [2] website, which broadcasts this ASCII movie using Telnet protocol on Port 23, and Python which makes socket implementation very easy for us. No authentication is needed for this broadcast. Anyone who is able to create a TCP socket and listens  blinkenlights.nl  on port 23 would be able to get this stream and display on their Python command line. CODE My main source for Python source code is [1]. What  code below does is simply importing Python "socket" library, create a socket, use " towel.blinkenlights.nl " address variable to create connection, receive data from socket and display it. While typing (copy/paste) code, be careful about indentatio...

ESP8266 Mini Project: GPIO with Button and LEDs

In this post, I'll be sharing a mini project of mine, again using ESP 8266 NodeMCU chip and MicroPython. This project mainly focuses on GPIO pins and methods for this chip. LEDs will be my output and I'll use a button as an Input. My input button will be used as a Start/Stop command for ongoing operation. Ongoing operation will be blinking of LEDs with varying frequency. I'll implement this project in two different methods: Using Asynchronous Polling Using Interrupt Request Setting Up Circuitry GPIO 16, GPIO 5, GPIO 4, GPIO 0, GPIO 2, GPIO 14 pins will be configured as Output pins being pin_D0, pin_D1, pin_D2, pin_D3, pin_D4, pin_D5 respectively. GPIO 12 will be configured as Input pin and will be connected to a small button circuitry. Button simply behaves as a switch and default position is OPEN (no contact between side pins). By default, logic LOW (0) is applied to input pin, when button is pressed (switch is closed) logic HIGH...

Talking to your ESP8266 Chip (Wired and Wireless Methods)

In my previous post, I mentioned how to setup our chip ESP8266 NodeMCU. As a convention throughout the industry, we should have our chip printed "Hello World!" for us. Firmware had already been installed on our chip. So, the only thing we need is to talk to our chip via Serial Communication Protocols. I'll categorize communication protocols in two groups: REPL and WebREPL .  REPL stands for Read Evaluate Print Loop. In the REPL section, I'll be talking about PuTTY and TeraTerm and in WebREPL section I'll  be talking about only WebREPL sw. 1- Wired REPL Methods i) PuTTY: Figure : A new Serial Session is opened thru PuTTY. Figure : Python Scrips (Hello World) ii) TeraTerm: Figure : TeraTerm Serial Connection Settings Figure : Python Scrips (Hello World) 2- Wireless REPL Methods:  i) WebREPL: Using any of the REPL options above (PuTTY or TeraTerm), first we need to install weprepl library onto chip. import w...