TNG

YouTube Channel - TNG Robotics   Visit Our YouTube Channel

Teaser 1 - Robo Buddy's Robo-Boogie!


Contact us for a 3D print quote:



Featured Robots

TNGROBOT-C9
TNGROBOT-C9

School programs that help teachers educate the next generation of students in robotics.


More robot workshops coming soon!

Archives
Imhotep's Legacy Academy (ILA)
First Public Workshops
CAP Canadian Association of Physicists

Learning WiFi Highlights 1
WeMos D1 Mini Demo


School Workshops
TNG Robotics - Open Source
Highlights 1 - Robot Parts


Highlights 2 - Power Glove

Dalhousie Physics Department

lesson 5 - obstacle avoidance car lesson 1 - led lesson 2 - photoresistor lesson 3 - servo lesson 4 - joypad

Lesson 1 - LED S.O.S.!!
Lesson 2 - Photoresistor
Lesson 3 - Servo
Lesson 4 - Analog Joystick
Lesson 5 - Obstacle Avoidance Car


We are open to chat  


About Us

Team TNG

We develop fun low-cost robotics kits for educational and enthusiast applications, with no prior experience required. Our kits feature: custom 3D-printed components, programmable microcontrollers, and a variety of sensors, motors, activities and the software to operate them. These kits work together with our instructional lessons to provide a fun and friendly introduction to the world of robotics, electronics, and programming! Designed to minimize hassle and maximize playful learning, we invite everyone to join us in imagining what is possible to achieve with accessible and powerful robotics and electronics of today!

About Our Products:

TNG Robotics kits are built to feel at home in classrooms, workshops, hobby shops, on computer desks, bookshelves and tabletops. The accompanying instructional lessons teach the fundamentals of using microcontrollers (like the famous Arduino) to power many kinds of electronic components and sensors. Instruction is also provided on how to write software in programming languages like python and C++ to operate all sensors and components as desired. Our robotics kits are ready-made examples of how these components can be used for fun, but they are also designed to inspire your own creativity and give you the fundamental building blocks to empower you on the path toward more complex projects of your own design!

About Us:

The co-founders of TNG Robotics met while completing physics degrees at Dalhousie University, in Nova Scotia, Canada. We boast professional backgrounds in academic curriculum development, laboratory research, public presentation, science communication, and software development. In these roles, we have learned not only the power and utility of inexpensive electronics and modern programming languages, but also their remarkable accessibility for beginners.

TNG Robotics is dedicated to enthusiastically sharing what we learn. We wish to inspire technologists of the future to explore the power of their creativity; to solve problems and create joy. Robots have been the first ambassadors from Earth to populate our solar system, and beyond! We hope we can be ambassadors for you, the next generation, whose robots will go ... somewhere ... or do ... something ... that even we can’t imagine yet!

YouTube Channel - TNG Robotics   Visit Our YouTube Channel

Teaser 1 - Robo Buddy's Robo-Boogie!



Class 1.0 | Learn Robotics

Levels: Students progress through "beginner," "intermediate," "advanced", and "diamond" badge levels, earning badges for mastering different skills. Learn how to build our own robots in micro-based python programming! Let's get started. Check out your Hex Prototype Assembly Design (HexP.A.D.) and HexLink complete with a powerful mini microcontroller the WeMos:

WeMos D1 Mini




Microcontroller: ESP8266EX, IoT, Wi-Fi Capable 802.11 b/g/n
Processor: Tensilica L106 32-bit RISC processor, clocked at 80/160 MHz
Micro-USB Port: Connect WeMos to your computer's USB.
Flash Memory: 4 MB
Operating Voltage: 3.3V
Supports: Arduino, C++, MicroPython, and NodeMCU Lua

5V Pin (Two Functions):
V-OUT: 5V output pin when WeMos is connected to external power.
V-IN: Accepts external 5V input from a regulated power supply or battery. The onboard regulator will convert this into 3.3V for the ESP8266.

3.3V Pin:
Provides 3.3V power directly to the ESP8266.
Use this if you're supplying your own regulated 3.3V power source.

Note: Do not power both the 5V and 3.3V pins simultaneously.

Step 1) Download the Software:

 Arduino Lab for MicroPython IDE  [Download Page]
 uPyCraft IDE  [Download Page]

MicroPython Basics


Class 1.1 | Beginner


Blink LED

Parts: LED

Pin.IN Configures the pin as an input.
Pin.OUT Configures the pin as an output.

Placeholder: Image of How To Connect LED to WeMos


from machine import Pin
from time import sleep

led = Pin(2, Pin.OUT)

while True:
  led.value(not led.value())
  sleep(1)
				

# LED BLINK EVERY 1-SECOND (Pin 2)
# We start by loading our MicroPython Modules	
			
from machine import Pin      # Import function 'Pin' from Module 'machine'
from time import sleep       # Import function 'sleep' from Module 'time'

led = Pin(2, Pin.OUT)        # Create 'led' variable to turn LED on/off
                             # Pin.OUT sets Pin 2 as an OUTPUT Pin

while True:                  # While the following statements are true, do
  led.value(not led.value()) # Turn the LED value on/off, using 'not' flip
  sleep(1)                   # 1-second delay
				

Class 1.2 | Intermediate


Read Light Sensor

Parts: Photoresistor

Learn how to detect the light level in a room using a Photoresistor! These are sensors for detecting light based on a variable resistance. You can access them using your analog pin (A0) on the Wemos D1 Mini and its built-in ADC (Analog-to-Digital Converter) to read the light level.

Your WeMos D1 Mini's ADC reads values between the range of 0 to 1023, corresponding to 0V to 3.3V.


from machine import ADC
from time import sleep

photoresistor = ADC(0)

while True:
    light = photoresistor.read()
    print("Light Level:", light)
    sleep(0.5)
				

# READ PHOTORESISTOR ON ADC (Pin A0)
# This method loads only 2 required functions	
			
from machine import ADC     # From Module 'machine' import function 'ADC'
from time import sleep      # From Module 'time' import function 'sleep'

photoresistor = ADC(0)      # Initialize the ADC pin (A0 on WeMos)

while True:
    light = photoresistor.read()  # Read the analog value (0-1023)
    print("Light Level:", light)  # Print the light level to the console
    sleep(0.5)                          # Pause for 0.5 seconds
				

Class 1.3 | Advanced


LED Night Light

Parts: LED and Photoresistor

Turn your LED on/off based on the Photoresistor light level. Use our analog pin (A0) as a switch to toggle our LED.


from machine import ADC, Pin
from time import sleep

photoresistor = ADC(0)
led = Pin(2, Pin.OUT)
THRESHOLD = 300

while True:
    light = photoresistor.read()
    
    if light  < THRESHOLD:
        led.on()
    else:
        led.off()
    
    print("Light Level:", light)
    sleep(0.2)
				

# READ PHOTORESISTOR ON ADC (Pin A0)
# This method loads 3 required functions	
			
from machine import ADC, Pin     # Import from Module 'machine' functions 'ADC, Pin'
from time import sleep           # Import from Module 'time' function 'sleep'

photoresistor = ADC(0)           # Initialize ADC for the photoresistor (A0)
led = Pin(2, Pin.OUT)
                                 # Define the light level threshold
THRESHOLD = 300                  # Adjust based on your environment

while True:
    light = photoresistor.read() # Read light level from photoresistor (0-1023)
    
    if light < THRESHOLD:        # Check the light level and toggle LED
        led.on()                 # Turn LED on (dark environment)
    else:
        led.off()                # Turn LED off (bright environment)
    
    print("Light Level:", light) # Print the light level for debugging
    sleep(0.2)                   # Tiny delay to avoid rapid toggling
				

Class 1.4 | Diamond Badge


LED Web Buttons

Parts: LED and WiFi

Turn your LED on/off based on the Web Buttons from a website the WeMos creates and connects to on your local Wi-Fi network. Toggle our LED by the web.

Update the following part in the code below with your Wi-Fi name & password. Replace 'Your-WIFI' with your Wi-Fi's name and 'Your-PASSWORD' with your Wi-Fi's password.

ssid = ' your-WIFI '
password = ' your-PASSWORD '


import network
from machine import Pin
import socket

led = Pin(2, Pin.OUT)

ssid = 'your-WIFI'
password = 'your-PASSWORD'
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
while not wlan.isconnected():
    pass
print('Connected to Wi-Fi, IP:', wlan.ifconfig()[0])

html = """
<!DOCTYPE html>
<html>
<head>
    <title>LED Control</title>
</head>
<body style='text-align:center;'>
    <h1>Toggle LED</h1>
    <form action="/on"><button>Turn ON</button></form>
    <form action="/off"><button>Turn OFF</button></form>
    <h4>Click twice if needed</h4>
</body>
</html>
"""

addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1]
server = socket.socket()
server.bind(addr)
server.listen(1)
print('Server running...')

while True:
    conn, addr = server.accept()
    request = conn.recv(1024).decode()
    if '/on' in request:
        led.on()
    elif '/off' in request:
        led.off()
    conn.send("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n" + html)
    conn.close()
				

# TURN LED ON/OFF BY WEBSITE BUTTONS
# Load Modules and Functions	

import network
from machine import Pin
import socket

# Initialize LED on GPIO2
led = Pin(2, Pin.OUT)

# Connect to Wi-Fi
ssid = 'your-WIFI'
password = 'your-PASSWORD'
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
while not wlan.isconnected():
    pass
print('Connected to Wi-Fi, IP:', wlan.ifconfig()[0])

# HTML page
html = """
<!DOCTYPE html>
<html>
<head>
    <title>LED Control</title>
</head>
<body style='text-align:center;'>
    <h1>Toggle LED</h1>
    <form action="/on"><button>Turn ON</button></form>
    <form action="/off"><button>Turn OFF</button></form>
    <h4>Click twice if needed</h4>
</body>
</html>
"""

# Start server
addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1]
server = socket.socket()
server.bind(addr)
server.listen(1)
print('Server running...')

# Handle requests
while True:
    conn, addr = server.accept()
    request = conn.recv(1024).decode()
    if '/on' in request:
        led.on()
    elif '/off' in request:
        led.off()
    conn.send("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n" + html)
    conn.close()
				

Hey!

We think you are pretty cool. Find out why.