-
Notifications
You must be signed in to change notification settings - Fork 3
Home
JoshuaBThompson edited this page May 26, 2024
·
23 revisions
- Pocket STEM IoT device that runs MicroPython
- Allows students and STEM enthusiasts to create their own STEM toys or experiments
- Users can create there own "kits" and user interface that runs on our KitLab mobile app or web app
- Users can share their kits with others to edit or use
- Teachers can get their students up and running in less than 60 seconds with only a phone
- Cables and Computers are optional!
- Turn on JEM with power switch
- Open the JEM Web App or install JEM iOS App
- Open the Web or Mobile App and Connect (may take 5 - 30 secs for App to find JEM)
- Try out one of the features using the command line
- Here is the example from the gif
########### LED EXAMPLE ####################
from jemled import JemLed
led = JemLed()
led.set_color((100, 0, 0))
led.off()
You can run these examples by:
- Typing directly on the REPL terminal
- Or by adding code directly to main.py
- Or by adding code directly to your kit python file (ex: kits/simple/simple.py)
Try any of the following examples out on your repl
######## buzzer ####################
from jembuzzer import *
buzz = JemBuzzer()
buzz.start(100) # 100 hz freq
buzz.stop() # stop making sound
# try other frequencies, like 50, 100, 200, 500, 1000 ...etc
######## motion sensors (accelerometer, gyro and magnetometer) ###############
from jemimu import JemIMU
imu = JemIMU()
imu.orientation # prints out the euler angles (roll, pitch, yaw)
######## battery monitor ####################
from jembattery import JemBattery
batt = JemBattery()
batt.soc() # battery life remaining 0 - 100%
######### range / distance sensor #################
from jemrange import JemRange
range = JemRange()
range.distance # move your hand up / down over the jem2 sensor window
######### ambient light intensity sensor #########
from jemlight import JemLight
light = JemLight()
light.intensity() # move your hand up / down over the jem2 sensor window
######### pressure, temperature, humidity sensor #########
from jembarometer import JemBarometer
bar = JemBarometer()
bar.read() # outputs temperature, pressure and humidity
######### user button ###########
from drivers import button
btn = button.Button()
btn.read() # should return 0 or 1 depending if pressed
- You will most likely want to control the low level peripherals of the JEM ESP32 MCU
- For example: gpio, i2c, pwm, timer, and adc ... etc
- This tutorial from ESP32 provides a great example
- Let's try the GPIO example
- Optional:
- Get a simple LED like this
- Connect the long LED lead to JEM IO4 (see pinout: https://github.com/kitlab-io/micropython/wiki/7.-JEM-Hardware-Specs#view-2)
- Connect the short LED lead to a JEM GND Pin
- Connect to JEM on the Web App or you local terminal and type
>>> from machine import Pin
>>> p4 = Pin(4, Pin.OUT)
>>> p4.on() # LED should turn ON!
>>> p4.off() # LED should turn OFF
kitlab.io 2023