Nuria Valsells i Vilalta
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
Micro Challenge I: Talk to the city ==================== ***MDEF:** Digital Prototyping For Design* ***`Team names`** Marius and Núria* **Index** [TOC] ## Introduction ### Areas of interests and project alignment ![interests](https://hackmd.io/_uploads/r1ArS0js6.png) ### Research project With this project we want to turn the city into a navigable space without individual digital devices (mobile phones). Add elements of signaling routes, important information of areas of the city and spaces for receiving feedback from citizens. To be able to "talk" to the city, to be able to collect proposals from citizens in an interactive, community and easy to use way. In order to start the project it is necessary to collect data on the needs of the city's inhabitants to be able to incorporate them into the new "gamified city" system. ### Artifact description City companion that gives the opportunity to the citizens to talk to the city and (maybe) recieve feed back from her. The artifact we will design is an easy, interactive and accessible way for citizens to give feedback on the city about what do they want. It must be safe, anonymous, appealing and useful for the project. <br></br> ## Project development ### References ![refereneeec](https://hackmd.io/_uploads/ryblERisp.png) ### First drafts and sketches ![sketch](https://hackmd.io/_uploads/rJ-UmAjoa.png) ### Materials and technologies needed - Raspberry Pi - Microphone - Button - Computer - Wood/Acrylic - Laser Cutting machine - Paper printing ### Project planning ![image](https://hackmd.io/_uploads/rkh5GRjjT.png) <br></br> ## Fabrication documentation ### Raspberry Pi ![raspb1](https://hackmd.io/_uploads/rJEgEn3ia.png) In this Raspberry Pi setup we used a usb microphone/speaker headset and a button to record voice messages. please note the following steps: 1. Set up your Raspberry pi through downloading the os from the raspberry website and upload it to your SD Card 2. Preferably use a usb microphone, because aux is recognized by the raspberry as an output and can only be used as a microphone in a complicated way. for this you would need a usb adapter that splits input and output. 3. type `sudo raspi-config` in the terminal, go to "System Options" -> "Audio" and ensure you have the selected the correct input device. 4. install with `pip install pyaudio` in your terminal the necessary library to use audio functions on your raspberry pi Code to record wav. files with timestamp while button press: ``` import RPi.GPIO as GPIO import time import subprocess import pyaudio import wave import datetime # GPIO pins BUTTON_PIN = 17 # Audio Settings FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 CHUNK = 1024 RECORD_SECONDS = 10 WAVE_OUTPUT_FILENAME = "recording.wav" # Initialize GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(BUTTON_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Function to start recording audio def start_recording(): # Generate a unique filename based on the current timestamp timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") output_file = f"recording_{timestamp}.wav" print("Recording...") frames = [] audio = pyaudio.PyAudio() stream = audio.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) while GPIO.input(BUTTON_PIN) == False: data = stream.read(CHUNK) frames.append(data) print("Stopped recording.") stream.stop_stream() stream.close() audio.terminate() # Save the audio to a WAV file wf = wave.open(output_file, 'wb') wf.setnchannels(CHANNELS) wf.setsampwidth(audio.get_sample_size(FORMAT)) wf.setframerate(RATE) wf.writeframes(b''.join(frames)) wf.close() try: while True: input_state = GPIO.input(BUTTON_PIN) if input_state == False: print('Buttonpressed') start_recording() time.sleep(0.2) finally: GPIO.cleanup() ``` ### Microphone ![mic1](https://hackmd.io/_uploads/B1XbE3noT.png) We found out the audio input can only come from USB, not AUX for the Raspberry Pi. To find a microphone that checked the requirements, we decided to go with a speaker/microphone headset. At the beginning it wasn't working, and we thought it was too confusing to have 2 functions in the same input for the Raspberry Pi. We realized the microphone of the headset wasn't working, and when we changed it for another headset, the code worked. As a way to cover a little bit the mic and reduce background and wind sound, we covered it with a noise filter. ![mic2](https://hackmd.io/_uploads/BJ1MN22sT.png) ### Button ![button1](https://hackmd.io/_uploads/Bkcz4n3o6.png) We used a similar button to the one we needed for our project of The Machine Paradox, so for the sake of reusing we extracted it from the previous machine and used it for this new one. The button was an easy configuration, we plugged it into the Raspberry Pi pins. It was more difficult to figure out which commands we needed to use for each pin. But once we figured it out, it worked. ### Structure ![structura1](https://hackmd.io/_uploads/H1OQV32s6.png) To collect the electronic parts and all the elements we designed a box to be manufactured by laser cutting. The box was placed on a metal structure that we recycled from Iaac, and for the support of the main poster, we laser cut a round structure that would hold the main poster straight. ![structura2](https://hackmd.io/_uploads/ByBVE33s6.png) ### User experience We wanted to make a design that was appealing and simple for the user. That's why we incorporated a poster and some instructions on top of the box. <br></br> ## Final Result ### Problems we faced - Configuring a Raspberry Pi board for the first time on our own. - Finding a microphone that worked, was a USB entry and fitted the form requirements for the machine. - Face a problem with the laser cut machine's mirror. - Coding with Python with little to no expertise. - Timing, we thought we'd be faster with the tasks. That made us lower our expectations about the machine and realize that we had to go step by step. - When trying to incorporate the transcript into the code, the libraries and functions we needed also affected our "simple working code". ### Future explorations ![Process](https://hackmd.io/_uploads/ByxC2poip.png) - Incorporation of Language Recognition Tool to transcript all of the answers, no matter the language. So we can store data in text and not sound. - [tutorial](https://www.youtube.com/watch?v=2kSPbH4jWME) - https://alphacephei.com/vosk/ - Adding a speaker to the machine, so we can use the text inputs, give it to an AI bot simulating the city, converting the text from the bot to voice and play it for the participants.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully