Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
fd08cc2
Update README.md
ji227 Aug 27, 2025
0075f08
Create text
ji227 Aug 30, 2025
18186da
Add files via upload
ji227 Aug 30, 2025
2849562
Update README.md
ji227 Aug 30, 2025
1941a13
Update README.md
ji227 Aug 30, 2025
95e0e93
Update README.md
ji227 Aug 30, 2025
724c431
Update README.md
ji227 Aug 30, 2025
ada3f40
Create text
ji227 Aug 30, 2025
e58dc87
Add files via upload
ji227 Aug 30, 2025
89b6720
Create text
ji227 Aug 30, 2025
a929213
Add files via upload
ji227 Aug 30, 2025
da5b227
Update README.md
ji227 Aug 30, 2025
35c39ac
Update README.md
ji227 Aug 31, 2025
39d9bf8
Update README.md
ji227 Aug 31, 2025
e6b4f5b
Update README.md
ji227 Aug 31, 2025
91627ff
Update README.md
ji227 Aug 31, 2025
0530e03
Update README.md
ji227 Aug 31, 2025
082f879
Update README.md
ji227 Aug 31, 2025
7bb8644
Update README.md
ji227 Aug 31, 2025
5fd1f12
Update README.md
ji227 Aug 31, 2025
ff0708d
Create text
ji227 Aug 31, 2025
69872d7
Add files via upload
ji227 Aug 31, 2025
c2a5ede
Create text
ji227 Aug 31, 2025
f930f62
Add files via upload
ji227 Aug 31, 2025
027314b
Add files via upload
ji227 Aug 31, 2025
d7b47d8
Create text
ji227 Aug 31, 2025
d563953
Add files via upload
ji227 Aug 31, 2025
a92843b
Update README.md
ji227 Aug 31, 2025
eb415f4
Update README.md
ji227 Aug 31, 2025
3306877
Update README.md
ji227 Aug 31, 2025
750dff7
Update README.md
ji227 Aug 31, 2025
1442be4
Update README.md
ji227 Sep 8, 2025
c1e126c
Update README.md
ji227 Sep 8, 2025
473cf31
Update README.md
ji227 Sep 8, 2025
42f6c33
Add files via upload
ji227 Sep 11, 2025
cfbac75
Merge pull request #1 from ji227/ji227-patch-2
ji227 Sep 11, 2025
e66111e
Add files via upload
ji227 Sep 11, 2025
601090d
Add files via upload
ji227 Sep 11, 2025
80972cf
Merge pull request #2 from ji227/ji227-patch-3
ji227 Sep 11, 2025
4712ce3
Add files via upload
ji227 Sep 11, 2025
fabb792
Merge pull request #3 from ji227/ji227-patch-4
ji227 Sep 11, 2025
7718720
Update README.md
ji227 Sep 11, 2025
9651985
Merge pull request #4 from ji227/ji227-patch-5
ji227 Sep 11, 2025
4849216
Update README.md
ji227 Sep 11, 2025
ef02249
Merge pull request #5 from ji227/ji227-patch-6
ji227 Sep 11, 2025
86da8cd
Update README.md
ji227 Sep 11, 2025
a6a59a5
Update README.md
ji227 Sep 11, 2025
da54c6f
Update README.md
ji227 Sep 15, 2025
7677a57
Merge pull request #7 from ji227/ji227-patch-8
ji227 Sep 15, 2025
b9576b6
Update README.md
ji227 Sep 15, 2025
11a3dd5
Merge pull request #8 from ji227/ji227-patch-9
ji227 Sep 15, 2025
bd111bc
Update README.md
ji227 Sep 15, 2025
875f8cd
Update README.md
ji227 Sep 17, 2025
2b336d4
Merge pull request #9 from ji227/ji227-patch-10
ji227 Sep 17, 2025
3bbf12d
Completed Lab2 Part2: Added a graphical clock with interactive button…
ji227 Sep 17, 2025
364439e
My latest changes
ji227 Sep 17, 2025
88c8625
Update README.md
ji227 Sep 17, 2025
3dd121b
Update README.md
ji227 Sep 17, 2025
868ae86
Merge pull request #10 from ji227/ji227-patch-12
ji227 Sep 17, 2025
637a786
Update README.md
ji227 Sep 17, 2025
0c3cf8c
Merge pull request #11 from ji227/ji227-patch-13
ji227 Sep 17, 2025
5155da8
Update README.md
ji227 Sep 17, 2025
983ce8b
Update README.md
ji227 Sep 17, 2025
0d2e7fc
Merge pull request #12 from ji227/ji227-patch-14
ji227 Sep 17, 2025
c558ae1
Update README.md
ji227 Sep 17, 2025
555ca9b
Merge pull request #13 from ji227/ji227-patch-15
ji227 Sep 17, 2025
4b5c3cf
Add files via upload
ji227 Sep 27, 2025
20f773a
Merge pull request #14 from ji227/ji227-patch-16
ji227 Sep 27, 2025
5bc9f31
Update README.md
ji227 Sep 27, 2025
9ca7b4f
Merge pull request #15 from ji227/ji227-patch-17
ji227 Sep 27, 2025
1a5a1fd
Update README.md
ji227 Sep 27, 2025
915380f
Merge pull request #16 from ji227/ji227-patch-18
ji227 Sep 27, 2025
3fe3a3f
Lab 3: Added greeting script (my_greeting.sh)
ji227 Sep 27, 2025
2d612dd
Update README.md
ji227 Sep 27, 2025
729eab3
Merge pull request #17 from ji227/ji227-patch-19
ji227 Sep 27, 2025
0aac36b
Update README.md
ji227 Sep 27, 2025
edba5ee
Merge pull request #18 from ji227/ji227-patch-20
ji227 Sep 27, 2025
b0c149e
Lab 3: Added numerical_input.sh script after fixing microphone and co…
ji227 Sep 28, 2025
6904e98
Merge branch 'Fall2025' of https://github.com/ji227/Jesse-Iriah-s-Lab…
ji227 Sep 28, 2025
4765d0b
Update README.md
ji227 Sep 28, 2025
46f80bf
Merge pull request #19 from ji227/ji227-patch-21
ji227 Sep 28, 2025
5d15bfa
Update README.md
ji227 Sep 28, 2025
8b20e29
Merge pull request #20 from ji227/ji227-patch-22
ji227 Sep 28, 2025
2ff3169
Add files via upload
ji227 Sep 28, 2025
513ba40
Update README.md
ji227 Sep 28, 2025
8481832
Merge pull request #21 from ji227/ji227-patch-23
ji227 Sep 28, 2025
9f53cab
Create txt
ji227 Sep 28, 2025
d9480a4
Merge pull request #22 from ji227/ji227-patch-24
ji227 Sep 28, 2025
dd80152
Add files via upload
ji227 Sep 28, 2025
dcabb34
Update README.md
ji227 Sep 28, 2025
a0a53f8
Merge pull request #23 from ji227/ji227-patch-25
ji227 Sep 28, 2025
a456f5b
Add files via upload
ji227 Sep 28, 2025
89fb848
Update numerical_input.sh
ji227 Oct 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Lab 1/Feedback/Feedback.pdf
Binary file not shown.
11 changes: 11 additions & 0 deletions Lab 1/Feedback/text
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
I presented my seven storyboard ideas to my breakout room group. I explained the plan (setting, players, activity, and goals)for each storyboard and showed my 4–frame sketches.

**Feedback I received:**
They liked that the interactions were very clear and easy to understand - like a storybook.
They suggested keeping the light colour consistent across frames to avoid confusion (e.g., yellow = warming, green = good, red = bad).
They mentioned that for the sunrise alarm, the gradual brightness idea was intuitive and could work well in real life e.g. at hotels or luxury apartments.

**What I improved:**
I made sure the light colours in all storyboards were consistent and clearly indicated the right status.
I simplified my sketches to make them easier to follow (fewer background details).
I made the captions shorter and more direct so they fit neatly under each frame.
Binary file added Lab 1/Plan/Page 1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Lab 1/Plan/Page 2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
62 changes: 62 additions & 0 deletions Lab 1/Plan/text
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Storyboard 1 – Charging Status Indicator
Setting: A bedroom nightstand or desk, at night or during the day when the phone needs charging.
Players: The phone owner.
Activity: The user places their phone on the wireless charger and glances at the light to check charging progress.
Goals:
User: To know when the phone is fully charged without unlocking it.
Device: To communicate charging status clearly using light colour.


Storyboard 2 – Smart Entryway Weather Indicator
Setting: House entryway.
Players: The person living in the house (and potentially family/housemates).
Activity: The user checks the light above the door before heading outside.
Goals:
User: To know if they need an umbrella, coat, or other gear before going out.
Device: To indicate good or bad weather quickly.


Storyboard 3 – Remote Locator
Setting: Living room.
Players: The person watching TV.
Activity: The user notices the remote is missing, uses the app to trigger the light on the remote, and retrieves it.
Goals:
User: To find the remote quickly and avoid wasting time searching.
Device: To make the remote’s location obvious through a glowing light.


Storyboard 4 – Smart Mailbox
Setting: Outside the house or at the apartment mailbox area, any time mail is expected.
Players: Resident, mail carrier.
Activity: The resident looks at the mailbox light before walking to it.
Goals:
User: To avoid checking an empty mailbox unnecessarily or to check at night.
Device: To signal whether mail has been delivered (green = empty, red = full).


Storyboard 5 – Smart Pot
Setting: Kitchen stove area.
Players: Home cook, pot, stove.
Activity: The user puts water to boil, and the pot detects temperature rise, turning on a light when boiling point is reached.
Goals:
User: To know when water reaches boiling without constantly watching.
Device: To visually alert user with light when boiling is complete.


Storyboard 6 – Sunrise Alarm Light
Setting: Bedroom, early morning before wake-up time.
Players: User (sleeping person).
Activity: Light gradually brightens before wake-up time to simulate sunrise.
Goals:
User: To wake up more naturally and gently.
Device: To gradually prepare user’s body for waking by increasing light brightness.


Storyboard 7 – Fish Tank Monitor
Setting: Living room or wherever the fish bowl is placed, throughout the day.
Players: Fish, fish owner.
Activity: Light on the lid indicates water quality. Owner refills or cleans water when needed.
Goals:
User: To maintain healthy water for the fish and know when it needs changing.
Device: To alert user to water condition through light colour changes.

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Lab 1/Prototypes/text
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

237 changes: 228 additions & 9 deletions Lab 1/README.md

Large diffs are not rendered by default.

Binary file not shown.
Binary file added Lab 1/Recordings/Storyboard: Idea 1 Recording.mp4
Binary file not shown.
Binary file added Lab 1/Recordings/Storyboard: Idea 3 Recording.mp4
Binary file not shown.
1 change: 1 addition & 0 deletions Lab 1/Recordings/text
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added Lab 1/Sketches/Sketches.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Lab 1/Sketches/text
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Lab 1/Storyboards/Storyboard 5 - Smart Pot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Lab 1/Storyboards/text
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

123 changes: 123 additions & 0 deletions Lab 2/Extending the Pi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Extending the Pi

To extend the Pi, we are using breakout boards that connect to the PI using a standard communication bus [I2C](https://learn.sparkfun.com/tutorials/i2c/all). [StemmaQT](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma) and [Qwiic](https://www.sparkfun.com/qwiic#overview) use a standardized 4-pin connector to connect devices using the I2C protocol.

The StemmaQT and I2C parts often have a fixed I2C address; to differentiate between similar parts, the devices often have pads that allow additional bits to be pulled high or low. The addresses are in [hexidecimal](https://learn.sparkfun.com/tutorials/hexadecimal/introduction) format, things like `0x6f`. This is the hexadecimal (or hex) representation for the decimal number `111` which is represented as `1101111` in binary. You are not expected to make any kinds of conversions but should have some conceptual grasp that a hex value is just a number shown another way. [This Python library](https://towardsdatascience.com/binary-hex-and-octal-in-python-20222488cee1) will assist you if you need help manipulating hexidecimal numbers.

## Connecting a Button

The buttons you've used on the screen are quite simple. Aside from [debouncing](https://learn.adafruit.com/make-it-switch/debouncing), when you press down you are closing a circuit, allowing electricity flow to the pins wired to the two buttons, in this case [GPIO 23](https://pinout.xyz/pinout/pin16_gpio23) and [24](https://pinout.xyz/pinout/pin18_gpio24). That's a perfectly reasonable way to connect a button. I2C is not typically used for buttons but here, we demonstrate one way you might see it. This also allows additional functionality to be built right into the button, such as the ability to remember the last time it was pressed.

### Hardware

From your kit, take out the [mini-PiTFT](https://learn.adafruit.com/adafruit-mini-pitft-135x240-color-tft-add-on-for-raspberry-pi), a [stemmaQT cable](https://www.adafruit.com/product/4210) and the [Qwiic Button](https://www.sparkfun.com/products/16842). <p float="left">
<img src="https://cdn-learn.adafruit.com/assets/assets/000/082/842/large1024/adafruit_products_4393_iso_ORIG_2019_10.jpg" height="200" />
<img src="https://cdn-shop.adafruit.com/970x728/4210-02.jpg" height="200">
<img src="https://cdn.sparkfun.com//assets/parts/1/5/7/6/7/16842-SparkFun_Qwiic_Button_-_Green_LED-01.jpg" height="200">
</p>

Connect the one side of cable to the StemmaQT port on the underside of the PiTFT screen. It will only fit in one way, it should not require much force.

<p float="left">
<img src="https://cdn-learn.adafruit.com/assets/assets/000/087/539/medium640/adafruit_products_4393_quarter_ORIG_2019_10.jpg?1579991932" height="200" />
<img src="https://cdn-learn.adafruit.com/assets/assets/000/082/861/original/adafruit_products_image.png" height="200">
</p>

#### Setup
As before, connect to your Pi and activate your virtual environment.

```
ssh pi@ixe00
pi@ixe00:~ $ source circuitpython/bin/activate
(circuitpython) pi@ixe00:~ $
```

On the pi, Navigate to your interactive lab hub, pull changes from upstream, and install new packages. If you have [merge conflicts](https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts), you need to resolve them. If you've never done this before ask people in your group for help.

```
(circuitpython) pi@ixe00:~$ cd Interactive-Lab-Hub
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ git remote add upstream https://github.com/FAR-Lab/Interactive-Lab-Hub.git
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ git pull upstream Fall2022
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ git add .
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ git commit -m "merge"
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ git push
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub $ cd Lab\ 2/
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub/Lab 2 $ pip install -r requirements.txt
```

#### Open source hardware and software

This class uses a lot of material that is developed with the intention of being free, open and accessible. All of the parts you used for this lab openly post their code and schematics should others want to riff on these designs or learn how they work. You are encouraged to [take](https://learn.adafruit.com/adafruit-mini-pitft-135x240-color-tft-add-on-for-raspberry-pi/downloads) [a](https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf) [look](https://github.com/sparkfun/Qwiic_Button). You may find that someone has solved your problems for you and neatly packed them in a [library](https://github.com/gmparis/CircuitPython_I2C_Button). Feel free to look at and use solutions that others have posted so long as you **always cite their contributions**.

To demonstrate the button we are using this [CircuitPython library](https://github.com/gmparis/CircuitPython_I2C_Button). You can also try this [Sparkfun Library](https://github.com/sparkfun/Qwiic_Button_Py) which has slightly simpler syntax. The devices and sensors in your kit have libraries that will allow you to integrate them with your Pi using python. They also provide examples of usage. If you are unsure about how to use something, look at its documentation then ask your TAs.

Try running `python library_example.py`.

Some important things to note from the code:

* We create an I2C device to handle communication with the pi.
* We then scan for devices on the bus.
* We check if `default_addr = 0x6f` is listed in the found devices. This is the address your button comes programmed with, you can also change this and have it store the update on the button.
* Once we initialize the I2C_Button object the rest of the code shows us some of the builtin capabilities.

## If it doesn't work

The chances are that running `python library_example.py` works for a few seconds, before it returns 'OSError: [Errno 121] Remote I/O error'. This problem has to do with the I2C baudrate setting. If you run into this problem, you need to edit the /boot/config.txt file by typing:

`sudo nano /boot/config.txt`

- Search for where it says `dtparam=i2c_arm=on`, add a line beneath that that says `dtparam=i2c_arm_baudrate=10000`.
- If your `dtparam=i2c_arm=on` is commented out with a `#`, remove the `#` in front of `dtparam=i2c_arm=on`.
- Save the file and reboot your Pi with `sudo shutdown -r now`.

After rebooting, `python library_example.py` should work. If it seems to glitch the first time, exit the script with Ctrl+C and run the same command again.

## Under the I2C curtain (optional: complete only after working on your projects in groups)

Run the file `I2C_scan.py` and the output should look like:

```
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub/Lab 2 $ python I2C_scan.py
I2C ok!
I2C addresses found: []
```

Now plug the other end of the cable into the ports on the right of the button board. The pwr LED should turn on. Run the file again and you should see the device ID. You can also try daisy chaining multiple devices and sensors and running again.

```
(circuitpython) pi@ixe00:~/Interactive-Lab-Hub/Lab 2 $ python I2C_scan.py
I2C ok!
I2C addresses found: ['0x6f']
```
#### Read device registers

With I2C devices we can read the registers directly with `button_registers.py`. Run the command to see what the current registers for the button are. You can look [here](https://cdn.sparkfun.com/assets/learn_tutorials/1/1/0/8/Qwiic_Button_I2C_Register_Map.pdf) to try and figure out what the output means.

#### Leverage abstraction

Use a higher level device interface can make reading and writing registers for I2C devices easier. Try running `button_device.py` and pressing the button. Look at the code and the [list of registers](https://cdn.sparkfun.com/assets/learn_tutorials/1/1/0/8/Qwiic_Button_I2C_Register_Map.pdf) and see if you can figure out what line 56 is for.

```
56 write_register(device, STATUS, 0)
```

#### Connecting more that one button

The more buttons the merrier! ...but how do you control them individually when they are come with the same default I2C address `0x6f`?

Option 1 - Software: Look into the [list of registers](https://cdn.sparkfun.com/assets/learn_tutorials/1/1/0/8/Qwiic_Button_I2C_Register_Map.pdf) of the buttons again, is it possible to change the I2C address through software progrmming?

Option 2 - Hardware: Look at the bottom right corner of the back of the button, you should be able to local a sign of ADR with A0 - A3 jumpers. By solding these I2C address jumpers, you can actually change the address directly! Check [here](https://learn.sparkfun.com/tutorials/sparkfun-qwiic-button-hookup-guide/all) to see how the I2C address change!

<img src="https://cdn.sparkfun.com/assets/learn_tutorials/1/1/0/8/SparkFun_Qwiic_Button_ADR_Jumpers.jpg" height="200" />

## Connecting a Sensor

Your kit is full of sensors! Look up what they can do and feel free to ask your TAs, we love to talk sensors. We will go further in depth into sensors in the coming weeks, but we put this small sample here to demonstrate how you can get sensor data if you want to use it for your project this week.

We are going to connect the [Adafruit APDS9960 Proximity, Light, RGB, and Gesture Sensor](https://www.adafruit.com/product/3595). You can leave the button plugged in and daisy-chain the sensor, this is part of the magic of I2C.

<img src="https://cdn-shop.adafruit.com/1200x900/3595-03.jpg" height="200" />


Now run `python proximity.py`. What did you see? Check out [here](https://learn.adafruit.com/adafruit-apds9960-breakout/circuitpython) to learn more about the sensor and think about how you might be able to apply it in the future projects!
14 changes: 14 additions & 0 deletions Lab 2/I2C_scan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import board
import busio

# Try to create an I2C device
i2c = busio.I2C(board.SCL, board.SDA)
print("I2C ok!")
# ids = '\n'.join(map(str,i2c.scan()))
# print(f"I2C device ID's found:\n{ids}")

while not i2c.try_lock():
pass

print("I2C addresses found:", [hex(device_address) for device_address in i2c.scan()])
i2c.unlock()
Loading