Skip to content

Chat with my docs

Result

This work was completed at the 2024 Fab Academy Instructor Bootcamp in León, Spain:

Bootcamp page

Overview

I'm going to talk to my website (the one you're looking at) using a language model that runs on my laptop. The ultimate goal is to set up a web service that enables Fab Academy students to chat with the whole Fab Academy archive.

What I've done so far:

  • I installed GPT4All on my Windows machine. It's easy, anyone can do it! You just download a regular Windows installer and open a very simple graphical user interface where you can install and interact with various language models. I recommend GPT4All for anyone who's starting out running large language models on their own hardware. The models run in CPU-only mode, which is slow, but it works on all computers!

    In GPT4All:

    1. I ran a tiny 3B parameter model called Mini Orca in GPT4All and it was terrible. It's a 1.84 GB download.
    2. Then I tried a bigger 13B parameter model called Snoozy and got more promising results, but still not dependable. Beware, it's a 6.86 GB download!
    3. I installed SBert (only a 43.8 MB download) to be able to use the LocalDocs feature in GPT4All. I loaded my whole documentation repository into LocalDocs in the GPT4All GUI. Easy. Then I asked Snoozy questions about things that I did in the Fab Academy. The answers weren't great. This is probably because LocalDocs is mostly a search function. You're not actually fine-tuning the model or turning your documents into a vector database or anything like that. Still, a useful result.
  • Next, I installed Ollama in the Windows Subsystem for Linux. Ollama detected my NVidia CUDA GPU, so it runs language models much faster than GPT4All.

  • I ran a tiny 1B parameter model called tinyllama. It was as bad as Mini Orca.
  • Now I'm trying to install PrivateGPT. I can use that to turn my docs into a vector database and that should result in higher quality responses from the language models.
  • As part of the PrivateGPT effort I installed the mistral language model provided by Ollama on Ubuntu. Warning: The download is many gigabytes in size.

Now let's go into the details. I asked all the language models the same set of questions, to be able to compare the results.

Attempt 1: Ollama in Linux Mint, running in a virtual machine (failed)

The first thing that I tried was to set up Ollama inside a virtual machine. Ollama only runs on Mac and Linux, and this is a great reason to start using Linux for real. The installation couldn't be simpler, I simply opened a terminal and typed

install ollama
ollama run tinyllama

Ollama installed fine, but Virtualbox doesn't have access to the computer's GPU. Ollama detected that and decided to run in CPU only mode. I got an error when trying to run the smallest Ollama language model; tinyllama. The message was vague, but I gathered from a bit of Googling that the hardware isn't good enough to run the model. That was disappointing.

Attempt 2: GPT4All in Windows (Chat with docs not very good)

Conversations

I tried downloading the smallest model that it offers, Mini Orca. It's a 3 billion parameter model. It installed just fine and I was able to ask it some questions. It was a bit of a thrill to chat with something that lives on my laptop!

  • Hello
  • Hello! How may I assist you today?
  • Please write a research and development grant application for a small educational robot arm
  • Sure, here's an example of a research and development grant application for a small educational robot arm:

    Title: Designing an Educational Robotic Arm for K-12 Students

    Introduction: The purpose of this project is to design and develop an educational robotic arm that will be used in the classroom to teach students about mechanical engineering, programming, and microcontroller technology. The goal is to create a hands-on learning experience that will allow students to build and program their own robotic arms. This project will provide students with valuable skills for future academic and professional success.

    Objectives: The objectives of this project are as follows: 1. Design and develop an educational robotic arm that can be used in the classroom. 2. Create a user-friendly interface that allows students to program and control the robotic arm. 3. Develop curriculum materials that align with state standards for mechanical engineering, programming, and microcontroller technology. 4. Test and refine the robotic arm based on feedback from teachers and students. 5. Provide resources and support for teachers who want to integrate this project into their classrooms.

    Methods: The methods used in this project are as follows: 1. Research and analysis of existing educational robotic arms, including their features and limitations. 2. Collaboration with teachers and education experts to develop a curriculum that aligns with state standards for mechanical engineering, programming, and microcontroller technology. 3. Development of a user-friendly interface using C++ programming language. 4. Testing and refinement of the robotic arm based on feedback from teachers and students. 5. Creation of resources and support materials for teachers who want to integrate this project into their classrooms.

    Conclusion: The design and development of an educational robotic arm will provide K-12 students with a hands-on learning experience that will help them develop valuable skills in mechanical engineering, programming, and microcontroller technology. This project has the potential to enhance student engagement and academic success, as well as prepare them for future academic and professional opportunities.

  • Write Python code to communicate with a USB serial device

  • Sure! Here's an example of how you can use the usbserial library in Python to communicate with a USB serial device:

    import usb_serial
    
    ser = usb_serial.Serial('/dev/ttyACM0', 9600, timeout=15) # replace 'device' and 'port' with the actual values for your device and port
    
    while True:
    data = ser.readline().decode()
    print(data)
    time.sleep(1)
    

    In this example, we are using the usbserial library to create a serial connection between our Python code and a USB serial device (in this case, a serial port on a Raspberry Pi). We then use a while loop to continuously read data from the device until it's time for us to stop. You can modify the code to send data back to the device as well using the same syntax.

  • What is the Fab Academy?

  • The Fab Academy is an open educational program developed by the 3D Printing Company, 3D Systems. It provides a unique opportunity for individuals and teams to learn about 3D printing technology through hands-on experience, workshops, and online courses. The Fab Academy offers a range of courses that cover all aspects of 3D printing, from design and modeling to prototyping and manufacturing. Participants can earn certificates or degrees by completing the program's requirements.
  • who is svavar konradsson?
  • I'm sorry, but I couldn't find any information on a person named SVAVAR KONRADSSON. Can you please provide more context or details about who this person might be?
  • who is svavar konradsson? (Now and in the prompts below I'm using LocalDocs to connect MiniOrca to my documentation repo)
  • I'm sorry, but I couldn't find any information on a person named SVAVAR KONRADSSON. Can you please provide more context or details about who this person might be?
  • how do you do i2c communication between at412 microcontrollers? (Note that I wrote ATtiny412 incorrectly, let's see how the model deals with that)
  • To communicate with Atmel AT412 microcontrollers using I2C, you can use the following steps:
    1. Connect the two Atmel AT412 microcontrollers to a single I2C bus using an I2C header on each controller.
    2. Power up both controllers and wait for them to initialize.
    3. Write a simple program that sends data from one controller to another. This can be done by writing the desired data to a serial port on one controller, then sending it as a message to the other controller using I2C.
    4. Read data back from the other controller using I2C. You will need to write code that receives data from the other controller and converts it into a format that can be read by your program.
    5. Use the received data in your program.
  • is the fab academy difficult?
  • As an AI language model, I cannot provide subjective opinions or feedback on difficulty levels as it varies from person to person. However, the Fab Academy is designed for people with different backgrounds and skill levels, so it can be challenging if you are not familiar
  • what's a good project for machine week in the fab academy?
  • Hi! I'm sorry, but as an AI language model, I don't have access to information about specific projects or events that are part of the Fab Academy. However, you can check out the official website of the Fab Lab Reykjavik for more information on upcoming events and project ideas. You may also want to reach out to
  • how do i use modular things?
  • Hello! To use Modular Things in the Fab Academy, you can follow these steps:
    1. Install the necessary software on your computer to communicate with the microcontrollers (such as the Arduino IDE).
    2. Write a program that sends data to the microcontroller using the serial port.
    3. Connect the microcontroller to the serial port and wait for it to initialize.
    4. Write a message to the microcontroller using Modular Things' built-in messaging system.
    5. Monitor the output of the microcontroller to see if the message was received correctly.
    6. Use the data from the microcontroller in your program.
    7. Repeat steps 1-6 for each message you want to send to the microcontroller.
  • How to make a silicone mold?
  • To make a silicone mold in the Fab Academy, you can follow these steps:
    1. Choose a pattern from a digital file or print it out.
    2. Cut out the pattern with scissors or a knife.
    3. Clean the edges of the pattern with rubbing alcohol and a soft cloth.
    4. Apply silicone to one side of the pattern, making sure not to touch any edges with your fingers.
    5. Place the other side of the pattern in the silicone mold, making sure it's flat against the sides.
    6. Press down on the pattern until it fills the mold, and then release pressure.
    7. remove the mold from the silicone by heating it with a hot knife or pliers.
    8. Clean the mold with rubbing alcohol and a soft cloth.
    9. Repeat steps 1-8 for each pattern you want to make a mold of.
  • how to make a resin casting in the fab academy?
  • To make a resin casting in the Fab Academy, you can follow these steps:
    1. Choose a pattern from a digital file or print it out.
    2. Cut out the pattern with scissors or a knife.
    3. Clean the edges of the pattern with rubbing alcohol and a soft cloth.
    4. Apply silicone to one side of the pattern, making sure not to touch any edges with your fingers.
    5. Place the other side of the pattern in the silicone mold, making sure it's flat against the sides.
    6. Press down on the pattern until it fills the mold, and then release pressure.
    7. Remove the mold from the silicone by heating it with a hot knife or pliers.
    8. Clean the mold with rubbing alcohol and a soft cloth.
    9. Repeat steps 1-
  • how do i calibrate a cnc machine?
  • To calibrate a CNC machine, you can follow these steps:
    1. Check the condition of the machine and make sure it's in good working order.
    2. Choose a suitable reference point or calibration target that is known to be accurate.
    3. Use the tool to create a mark on the workpiece
    4. Move the machine to the desired position where you want the part to be cut.
    5. Use the CNC system to program and execute the cutting operation.
    6. Record the data from the machine's sensors during the cutting process, including the feed rate, depth of cut, and tool position.
    7. Analyze the recorded data to identify any errors or discrepancies that may affect the accuracy of the part being cut.
    8. Use the CNC system to adjust the parameters of the cutting operation until the desired accuracy is achieved.9. Repeat steps 4-8 for each reference point or calibration target you want to calibrate the machine with.
    9. Document and store all relevant data, including the reference points and any adjustments made, for future reference.

I used the LocalDocs feature in GPT4All to ask my Fab Academy documentation website some questions. The answers were not very useful. This should perhaps not be surprising, since this feature is really mostly search. You're not fine-tuning the model or turning the documents into a vector database or anything like that. But it's quick and easy, and it's a start!

  • What is the Fab Academy?
  • The Fab Academy is an online program that offers a comprehensive education in digital fabrication, design and innovation. It was founded by Neil Gershenfeld of MIT's Center for Bits and Atoms (CBA) to make advanced digital fabrication tools accessible to people around the world. The program provides students with hands-on experience using cutting edge technology such as 3D printers, laser cutters, CNC machines, electronics labs, and more. Students learn about design principles, prototyping techniques, and entrepreneurship skills in order to create innovative projects that solve real world problems.
  • Please write a research and development grant application for a small educational robot arm
  • Title of Project: Educational Robot Arm Development Grant Application

    Project Summary: The proposed project is the development of an affordable, easy-to-use educational robot arm that can be used in classrooms to teach students about robotics and automation. The goal of this project is to create a tool that will help bridge the gap between theoretical concepts and practical applications by providing hands-on experience with real-world technologies such as 3D printing, laser cutting, CNC machining, electronics labs, and more.

    Project Description: The proposed educational robot arm project is designed to provide students with a comprehensive education in digital fabrication, design, and innovation using advanced technology tools. The aim of this project is to create an affordable, easy-to-use robot arm that can be used by teachers or instructors to teach students about the principles of automation, programming, mechanics, electronics, and more.

    The proposed educational robot arm will consist of a modular design with interchangeable parts such as arms, grippers, sensors, motors, and other components that can be easily replaced or upgraded based on student needs. The robot arm will also have an intuitive user interface that allows students to program the robot using drag-and-drop software tools without requiring any prior programming experience.

    The proposed educational robot arm project is expected to benefit a wide range of students, including those interested in engineering, computer science, physics, and other STEM fields. The project will also provide teachers or instructors with an affordable tool that can be used for demonstrations, experiments, and projects related to automation, programming, mechanics, electronics, and more.

    Project Timeline: The proposed educational robot arm development grant application is expected to take approximately 12 months from start to finish. The project timeline includes the following milestones:

    • Research and Development Phase (3 Months): This phase will involve conducting research on existing educational robots, identifying gaps in their capabilities, and developing a prototype design for an affordable, easy-to-use robot arm that can be used by teachers or instructors. The project team will also work to develop software tools for programming the robot using drag-and-drop interfaces.
    • Prototype Development Phase (3 Months): This phase will involve building and testing a prototype of the proposed educational robot arm, refining its design based on feedback from students and teachers or instructors, and incorporating additional features such as sensors, motors, grippers, and other components that can be easily replaced or upgraded.
    • Final Development Phase (3 Months): This phase will involve testing the final prototype of the proposed educational robot arm in classrooms to ensure it meets student needs and provides a valuable learning experience. The project team will also work on developing documentation, training materials, and support resources for teachers or instructors who want to use the robot arm in their classes.
    • Deployment Phase (3 Months): This phase will involve distributing the final prototype of the proposed educational robot arm to schools and other organizations that are interested in using it as an educational tool. The project team will also work on developing a sustainable business model for maintaining, updating, and supporting the robot arm over time.

    Project Budget: The total budget required for this project is estimated at $100,000 USD. This includes expenses such as research and development costs, prototype development, testing, documentation, training materials, support resources, distribution, sustainability, and marketing. The proposed educational robot arm will be sold to schools or other organizations that are interested in using it for teaching purposes at a cost of $500 USD per unit.

    Conclusion: The proposed project is an innovative solution that can help bridge the gap between theoretical concepts and practical applications by providing students with hands-on experience using real-world technologies such as 3D printing, laser cutting, CNC machining, electronics labs, and more. The educational robot arm will be a valuable tool for teachers or instructors to use in their classes, helping them teach automation, programming, mechanics, electronics, and other STEM fields with ease. We believe that this project has the potential to make a significant impact on education and innovation, and we look forward to working with you to bring it to life.

  • Write Python code to communicate with a USB serial device

  • Here is an example of how to use the serial module in Python to read data from a USB serial device:
    import serial
    
    ser = serial.Serial('COM1', baudrate=9600) # replace 'COM1' with your desired port name and baud rate
    
    while True:
        try:
            ser.readline()
            print(f"Received data from the USB device: {ser.readline()}")
        except serial.SerialException as e:
            if str(e) == 'No such file or directory': # check for a specific error message that indicates an invalid port name
                continue  # try again with a different port name
    
  • who is svavar konradsson?
  • Svavar Konráðsson (born May 2, 1975) is an Icelandic entrepreneur and inventor. He has founded several companies in the fields of technology, finance, and real estate development. Some of his notable ventures include Skype Technologies S.A., which he co-founded with Janus Friis in 2003; Bidco Oy, a Finnish company that specializes in online auctions for used cars; and AQS Capital Management AB, an Icelandic investment firm focused on real estate development projects. Konráðsson is also known for his philanthropic activities, including supporting the arts, education, and environmental causes through various organizations such as Reykjavik Art Museum, The National Museum of Iceland, and Arctic Initiative.
  • who is svavar konradsson? (Now and in the prompts below I'm using LocalDocs to connect Snoozy to my documentation repo)
  • Svavar Konráðsson (born May 2, 1975) is an Icelandic entrepreneur and inventor. He has founded several companies in the fields of technology, finance, and real estate development. Some of his notable ventures include Skype Technologies S.A., which he co-founded with Janus Friis in 2003; Bidco Oy, a Finnish company that specializes in online auctions for used cars; and AQS Capital Management AB, an Icelandic investment firm focused on real estate development projects. Konráðsson is also known for his philanthropic activities, including supporting the arts, education, and environmental causes through various organizations such as Reykjavik Art Museum, The National Museum of Iceland, and Arctic Initiative. Context: instructors, Árni Björnsson and Þórarinn Bjartur Breiðfjörð Gunnarsson, came to support us during this intense session of work. Þórarinn and I flew in from Ísafjörður and Árni, respectively, while Bjarn

  • how do you do i2c communication between at412 microcontrollers? (Note that I wrote ATtiny412 incorrectly, let's see how the model deals with that)

  • To communicate with ATmega412 microcontrollers using the I2C protocol, follow these steps:

    1. Connect the two data wires (SDA and SCL) from each MCU to separate pins on your Arduino board or any other device that supports I2C communication. For example, you can connect them to A4 and A5 respectively for ATmega412 microcontrollers.
    2. Use the Wire library in combination with an appropriate I2cDevice object to communicate with each MCU individually. The Wire class provides a convenient way of working with I2C lines, while the I2cDevice interface allows you to read and write data from/to the microcontrollers over their respective I2C interfaces.
    3. When writing data to an ATmega412 MCU using I2C communication, ensure that it is configured as a slave device by setting its address register (e.g., Wire.beginTransmission(address)) and then sending the desired byte of data over the SDA line (Wire.write(data).
    4. When reading from an ATmega412 MCU, use the appropriate read function to retrieve the requested data bytes from its registers (e.g., I2cDevice.readFrom()). Be sure to specify the correct address and register values for your specific application.
  • is the fab academy difficult?

  • The difficulty level of the Fab Academy can vary depending on an individual's prior knowledge and experience in engineering, design, and fabrication. However, it is generally considered to be challenging due to its intensive nature and fast-paced curriculum that covers a wide range of topics within these fields. The program requires students to work independently as well as collaboratively on projects, which can require significant time management skills and self-motivation. Additionally, the Fab Academy's focus on hands-on learning through prototyping and fabrication may be challenging for those with limited experience in these areas.
  • what's a good project for machine week in the fab academy?
  • A good Machine Week project in the Fab Academy could be one that involves designing and building an automated system or tool, such as a robotic arm, CNC milling machine, 3D printer, laser cutter, or other fabrication equipment. The goal should be to create something useful for yourself or others while also learning about the principles of computer-controlled machines and their applications in various fields. Another option could be developing a project that involves integrating multiple machines together into an automated system, such as creating a conveyor belt with sensors and motors controlled by microcontrollers. This would allow you to explore the potential for collaboration between different tools and devices while also enhancing your understanding of their individual capabilities. Ultimately, the best project will depend on your interests, skills, and goals within the Fab Academy program. It's important to choose a topic that aligns with these factors in order to maximize your learning experience during Machine Week.
  • how do i use modular things?
  • To use Modular Things in your project, you will need to follow these steps:
    1. Purchase the necessary components from a supplier that offers OSAP-compatible modules and connectors (such as Adafruit or SparkFun).
    2. Connect the microcontroller board with an appropriate power source and USB cable to your computer's USB port.
    3. Install any required software drivers for the microcontroller on your computer, such as Arduino IDE or PlatformIO.
    4. Use a web-based interface like Modular Things Web to create a new project and add components (such as motors, sensors, and other devices) that are compatible with OSAP protocols.
    5. Connect each component to the microcontroller board using appropriate connectors and wiring according to its specifications.
    6. Test your setup by sending commands from Modular Things Web or another program that can communicate with the serial port of the microcontroller, such as Arduino IDE's Serial Monitor.
  • How to make a silicone mold?
  • To create a silicone mold, follow these steps:
    1. Purchase the necessary materials for creating a silicone mold, such as two-part polyurethane or epoxy resin and hardener, silicone rubber (such as Soft 107), acrylic sheeting, vacuum pot, mixing container, stirring sticks, and other tools.
    2. Clean the area where you will be working with mold-making materials to avoid contamination of your project. Cover any nearby surfaces or objects that could come into contact with silicone rubber.
    3. Mix together equal parts of polyurethane resin (A) and hardener (B), following manufacturer's instructions for proper mixing ratios, as well as safety precautions to avoid skin irritation from the chemicals involved in this process.
    4. Pour a small amount of mixed polyurethane into an acrylic sheeting or other mold-making container with sides that are slightly higher than your desired silicone rubber thickness (e.g., 1/8" for Soft 107). Place the mold in a vacuum pot to create a thin, steady stream of airflow and prevent bubbles from forming during curing.
    5. Once the polyurethane has cured into a solid mass (usually within an hour), carefully remove it from the acrylic sheeting or other container without disturbing its shape too much. This will be your mold for creating silicone rubber parts later on.
    6. Clean and prepare any surfaces that may come in contact with the silicone rubber, such as a vacuum pot used to create airflow during curing or stirring sticks from previous projects. These should not contain any contaminants that could affect your mold-making process.
    7. Measure out equal parts of Soft 107 silicone rubber and hardener, following manufacturer's instructions for proper mixing ratios to ensure a smooth consistency without air bubbles or other defects in the final product. Mix together thoroughly until fully combined.
    8. Pour the mixed silicone into your prepared mold (from step 4), making sure it fills all crevices and cavities evenly, but not so much that any excess spills over onto surrounding surfaces. Allow to cure for several hours or as directed by manufacturer's instructions, until a solid mass has formed within the silicone rubber mold.
    9. Once your silicone rubber part is fully cured and removed from its mold (usually after 24-72 hours), clean any excess material around it to avoid contamination of other projects or surfaces in the area. Store the finished product safely until ready for use, such as by attaching a motorized arm to your project using screws or other fasteners that can withstand the weight and movement of the silicone rubber part. ### Context: Second moldThe second mold came out well, except for a few bubbles. With the help of my father-in-law, I made another mold from this pattern, but it turned out the same. ## The right silicone arrives above it to form a thin, steady stream of silicone. The bubbles will be pushed out before entering the thin stream and curing into your final product.
  • how to make a resin casting in the fab academy?
  • To create a silicone rubber mold for your project, you will need to follow these steps:
    1. Prepare and clean any surfaces that may come into contact with the silicone rubber, such as stirring sticks or vacuum pots used during curing. These should not contain any contaminants that could affect your mold-making process.
    2. Measure out equal parts of Soft 107 silicone rubber and hardener, following manufacturer's instructions for proper mixing ratios to ensure a smooth consistency without air bubbles or other defects in the final product. Mix together thoroughly until fully combined.
    3. Pour the mixed silicone into your prepared mold (from step 4), making sure it fills all crevices and cavities evenly, but not so much that any excess spills over onto surrounding surfaces. Allow to cure for several hours or as directed by manufacturer's instructions, until a solid mass has formed within the silicone rubber mold.
    4. Once your silicone rubber part is fully cured and removed from its mold (usually after 24-72 hours), clean any excess material around it to avoid contamination of other projects or surfaces in the area. Store the finished product safely until ready for use, such as by attaching a motorized arm to your project using screws or other fasteners that can withstand the weight and movement of the silicone rubber part.
  • how do i calibrate a cnc machine?
  • To calibrate your CNC milling machine, you will need to follow these steps:
    1. Prepare the workspace and set up the necessary tools for measuring and adjusting the axes of motion in your CNC milling machine. This may include a micrometer or other precision measurement tool, as well as any required hardware or software components that allow you to make fine-grained adjustments to the positioning and movement of each axis.
    2. Measure the current position of each axis using your chosen measurement device, taking care to ensure accurate readings are recorded for all three axes (X, Y, Z). Compare these measurements against any available specifications or tolerances provided by the manufacturer or supplier of your CNC milling machine.
    3. Adjust the position and movement of each axis as needed based on the measured values and any relevant specifications or tolerances. This may involve making small adjustments to screws, nuts, bolts, or other hardware components that affect the positioning and motion of your CNC milling machine's axes.
    4. Repeat steps 1-3 as necessary until you have achieved accurate measurements for all three axes within any specified tolerances. This may involve making multiple adjustments to different parts of the system over time, so it is important to document each step and maintain a clear record of your progress throughout the calibration process.
    5. Once you are satisfied with the accuracy of your CNC milling machine's positioning and movement in all three axes, test its performance by running some sample jobs or projects through the system to ensure that it is producing consistent results across different parts and materials. This may involve using specialized software tools for generating G-code instructions or other programming tasks related to controlling your CNC milling machine's movements during operation.
    6. Finally, store any necessary documentation or records of your calibration process in a safe location that can be easily accessed later if needed, such as by consulting with an expert technician or engineer who may need this information for troubleshooting purposes or other tasks related to maintaining and optimizing the performance of your CNC milling machine. ### Context: The guide explains how to calibrate a CNC milling machine in order to ensure accurate positioning, movement, and cutting results when working with different parts and materials on this type of equipment. This process involves making fine-grained adjustments to the axes of motion using precision measurement tools and hardware components that affect the positioning and movement of each axis (X, Y, Z). The guide also recommends testing your CNC milling machine's performance after calibration by running sample jobs or projects through it. Finally, the guide suggests storing any necessary documentation or records related to this process in a safe location for later reference if needed.

I saw in a Youtube video that deduplication of data is important (removing duplicate data) when dealing with LLMs, so this time I only pointed the Snoozy LLM to the public folder in my documentation repo. This didn't make much of a difference.

  • who is svavar konradsson? (Now and in the prompts below I'm using LocalDocs to connect Snoozy to only the public folder in my documentation repo)
  • Svavar Konráðsson (born 1965) is an Icelandic musician, composer and producer. He has been active in the Icelandic music scene since the late 80s as a member of several bands including The Sugarcubes, GusGus, and Sigur Rós. Konráðsson also collaborated with other musicians such as Björk, Múm, Jónsi from Sigur Rós, and many others. He has released solo albums under the name Sveinbjörn Beinteinsson since 2013.
  • how do you do i2c communication between at412 microcontrollers? (Note that I wrote ATtiny412 incorrectly, let's see how the model deals with that)
  • To perform I2C communication between ATmega412 microcontrollers, follow these steps:

    1. Connect the two microcontrollers to each other using a 6-pin header cable or any suitable wiring method. The pins on one side of the cable should match those on the other side (e.g., SDA and GND).
    2. Set up the I2C communication protocol between both microcontrollers by configuring their respective registers:
    3. Onboard ATmega412 MCU:
      • Configure GPIO pins for I2C communication using GPIO_PIN macros (e.g., I2C_SCL = 9;, I2C_SDA = 8;).
    4. External ATmega412 MCU:
      • Configure GPIO pins for I2C communication using the same approach as above.
    5. Enable the internal pull-up resistors on both microcontrollers by setting I2C_PULLUP to 0 (e.g., I2C_PULLUP = 0;). This will ensure proper data transmission between devices without requiring external pull-ups.
    6. Set up the I2C communication speed and other parameters as needed, such as clock speed (I2C_SPEED), addressing mode (e.g., I2C_ADDRESS = 0x1;), and more. Refer to your microcontroller's datasheet for specific details on these settings.
    7. Start the I2C communication by writing data or reading from devices connected via their respective SDA/SCL pins:
      • Onboard ATmega412 MCU: Send commands, read data, and handle interrupts as needed (e.g., I2C_Read() function).
    8. External ATmega412 MCU: Read or write to devices connected via their respective SDA/SCL pins using the same approach as above.
    9. Keep in mind that I2C communication requires proper wiring, device addressing, and timing synchronization between both microcontrollers. Ensure your code handles any errors or timeouts appropriately (e.g., I2C_Error() function).
  • is the fab academy difficult?

  • The Fab Academy is not necessarily considered "difficult," but it does require dedication, focus, and hard work to complete successfully. The program provides students with access to high-quality online resources for learning various topics in digital fabrication (e.g., 3D printing, laser cutting), as well as opportunities for hands-on experience through internships or projects. To succeed in the Fab Academy, you should be prepared to invest significant time and effort into your studies, actively participate in online discussions and activities, collaborate with other students on group projects, and apply what you've learned by creating original designs and prototypes using digital fabrication tools. Overall, while completing the Fab Academy may require some level of challenge or difficulty, it is designed to be accessible for individuals who are motivated and committed to learning about cutting-edge technologies in digital fabrication.
  • what's a good project for machine week in the fab academy?
  • For Machine Week during Fab Academy, you can consider creating projects that demonstrate your skills with various CNC machines and tools (e.g., milling, drilling, cutting). Here are some ideas to get started:
    1. Design and fabricate a custom enclosure for an Arduino or Raspberry Pi board using the laser cutter. This project can help you develop proficiency in design software like Inkscape (for vector graphics) and G-code programming, as well as hands-on experience with cutting acrylic sheets on the laser cutter.
    2. Create a custom 3D printed enclosure for an Arduino or Raspberry Pi board that incorporates unique features or designs. This project can help you develop proficiency in design software like Tinkercad (for basic shapes) and Fusion 360 (for more advanced models), as well as hands-on experience with 3D printing on the Ultimaker printers.
    3. Design a custom CNC machine tool holder or fixture that can be used to securely hold various tools, such as drills, end mills, and taps. This project can help you develop proficiency in design software like Autodesk Fusion 360 (for parametric modeling) and G-code programming for CNC machines, as well as hands-on experience with using the laser cutter to fabricate parts from acrylic sheets or other materials. Remember that these are just examples; you can always come up with your own project ideas based on your interests, skills, and goals in digital fabrication.

Attempt 3: Ollama in WSL2

I installed Ollama on Ubuntu under the Windows Subsystem for Linux, and downloaded the smallest language model, tinyllama. Tinyllama only has around 1 billion parameters, and it performed about as badly as the Mini Orca model.

To install Ollama and tinyllama I used the same commands as in attempt 1, except this time I typed them into the WSL Linux terminal:

install ollama
ollama run tinyllama

Conversation
  • What is the Fab Academy?
  • The Fab Academy is a global platform for learning and innovation, promoting the sharing of ideas and knowledge in the field of fashion. It was founded by a group of industry leaders in 2013 to address the need for an open and collaborative environment that fosters creativity, innovation, and entrepreneurship in the fashion industry. The Fab Academy offers a range of online courses, workshops, and events, as well as networking opportunities, to help individuals, startups, and brands develop their skills, learn from peers and experts, and drive innovation in the fashion industry.
  • Who is Svavar Konradsson?
  • Svavar Konradsson is a Swedish entrepreneur and the founder of the Fab Academy. She has over 15 years of experience in the fashion industry, having worked for brands such as H&M, Zara, and Adidas. In 2013, she established the Fab Academy with a group of industry leaders to create an open and collaborative environment for creativity, innovation, and entrepreneurship in the fashiion industry. She holds a Bachelor's degree in Fashion Merchandising from Gothenburg University and has been recognized for her impact on the fashion industry through her contributions to education, research, and innovation.
  • how do you do i2c communication between at412 microcontrollers? (Note that I wrote ATtiny412 incorrectly, let's see how the model deals with that)
  • To do I2C communication between At412 microcontrollers, you need to follow these steps:

    1. Configure your software environment to communicate with the At412 microcontrollers using I2C (Inter-Integrated Circuit) protocol. You can use a microcontroller configuration tool like the Arduino IDE or PICkit 3 for this purpose.

    2. Connect the At412 microcontrollers to your computer/board/system by connecting the data and clock pins. Use I2C slave mode when communicating with the microcontrollers, which allows you to send commands and receive responses in parallel.

    3. Design a microcontroller program that communicates using I2C. You can use an I2C library provided by the microcontroller manufacturer or write your own program from scratch.

    4. Test your program on the At412 microcontrollers to ensure it is working properly. Connect the power supply and the microcontrollers to a computer/board/system with a USB cable, and use the I2C slave mode in the microcontroller software.

    5. Once you have verified that your microcontroller program works correctly on the At412 microcontrollers, you can start communicating with them using I2C. To do this, follow these steps:

      • Open a serial terminal window for communication with the microcontrollers (e.g. Serial Monitor or Serial Debugger).
      • Connect the power supply and the microcontrollers to your computer/board/system with a USB cable.
      • Select I2C mode in the microcontroller software using the appropriate I2C slave mode configuration tool.
      • Enter command mode by sending a "I" (or similar) command at the microcontroller's start address, followed by the commands you want to send.
      • Receive data responses by sending an "R" (or similar) command and waiting for a response at the microcontroller's stop address.

    That's it! Now you can start communicating with your At412 microcontrollers using I2C.

  • is the fab academy difficult?

  • The Fab Academy is a global platform for learning and innovation, promoting the sharing of ideas and knowledge in the field of fashion. It was founded by industry leaders in 2013 to address the need for an open and collaborative environment that fosters creativity, innovation, and entrepreneurship in the fashion industry. The Fab Academy offers a range of online courses, worksshops, and events, as well as networking opportunities, to help individuals, startups, and brand's develop their skills, learn from peers and expertise, and drive innovation in the fashion industry. While the Fab Academy can be challenging, it is designed to equip individuals with the knowledge, skills, and networks they need to succeed in the fast-paced and competitive world of fashion.
  • what's a good project for machine week in the fab academy?
  • Machine Week is the third in a series of innovation workshops organized by the Fab Academy. Each workshop focuses on a specific topic related to automation, robotics, and AI. Here are some potential ideas for Machine Week:

    1. Robotics: Build a functional robot using Arduino or Raspberry Pi. This project will involve designing, building, programming, and testing the robot's movement and functionality.

    2. Machine Learning: Design and build an autonomous car using machine learning algorithms. This project will require coding, data analysis, and modeling to optimize vehicle performance for autonomous driving.

    3. Fashion Startup Competition: Participate in a fashiion startup competition to showcase your innovation skills and network with industry leaders. Competing teams will present their ideas and receive feedback on how to improve them.

    4. Digital Design and Fabrication: Design and build a functional product using digital design software, 3D printing, and laser cutters. This project will require creating CAD files, programming the 3D printer, and assembling the final product.

    5. Data Analysis and Machine Learning: Analyze a large dataset using machine learning algorithms to predict customer behavior and optimize sales strategies. This project requires coding, data analysis, and modeling to identify patterns and trends in the data.

These are just a few ideas for Machine Week in the Fab Academy. The Fab Academy encourages participants to come up with their own unique projects, based on the topic of their choice.

  • Please write Python code to send serial messages to an Arduino device.
  • I can't write actual code, but I can provide you with a general idea of how to send serial messages to an arduino device using a python program.

    to connect to an arduino via serial port, you need to install the "serial" package on your system. Then, you can create an instance of the serial port class and pass it to the arduino object:

    import serial
    
    # open serial port
    serial_port = serial.serial_for_url("COM1", timeout=0.5)
    arduino = serial.Serial(serial_port, 9600, timeout=0.2)
    

    once the connection is established, you can send serial data to an arduino using the send() method of the arduino object:

    while True:
        # write some data to the serial port
        arduino.write(bytes("hello world\n", "ascii"))
    
        # read the serial data from arduino
        data = arduino.readline()
    
        if not data:
            break
    

    this program will send "hello world" to an arduino, and print each line of received data to the console. You can modify it to send different messages based on your needs.

Attempt 4: PrivateGPT in WSL (not working yet)

Here's what I've done so far. I've basically mixed together this and this tutorial, but I'm going to spell out the steps I took, for future reference:

Setup
  • I set up WSL2 (already done).
  • Then I got the WSL extension for VSCode
  • I cloned the repo for PrivateGPT
  • I found the link to the latest Miniconda (the minimal version of Anaconda) and used the command curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  • and completed these instructions
  • Installed Miniconda with bash Miniconda3-latest-Linux-x86_64.sh
  • Then I closed Ubuntu and VSCode and reopened VSCode.
  • Then I started a virtual environment using conda create -n privategpt python=3.11 as shown in this tutorial
  • Then conda activate privategpt to activate the privategpt environment
  • Then I followed the installation instructions in the readme in PromptEngineer48/Ollama/2-ollama-privateGPT-chat-with-docs, starting with pip install -r requirements.txt
  • I got an error:
    Failed to build llama-cpp-python chroma-hnswlib
    ERROR: Could not build wheels for llama-cpp-python, chroma-hnswlib, which is required to install pyproject.toml-based projects
    
    RuntimeError: Unsupported compiler -- at least C++11 support is needed!
    
  • So I installed GCC with sudo apt install build-essential according to this tutorial
  • Then I ran pip install -r requirements.txt again
  • That went well this time, now to get the mistral model: ollama pull mistral
  • Created A directory for source documents: mkdir source_documents
  • Then cloned my fab academy site repository to ubuntu wsl2 and copied only the public folder into source_documents
  • Then I tried to ingest the files, but got the following error:

    (base) svavark@MI0321:~/Ollama/2-ollama-privateGPT-chat-with-docs$ python ingest.py
    Traceback (most recent call last):
    File "/home/svavark/Ollama/2-ollama-privateGPT-chat-with-docs/ingest.py", line 8, in <module>
        from langchain.document_loaders import (
    ModuleNotFoundError: No module named 'langchain'
    
  • I noticed that I was in (base) but not (privategpt), so I restarted conda: conda activate privategpt

  • Then python ingest.py and it worked! Lots of little caveats here and there. I closed the folder in VSCode in order to copy the public folder over to source_documents, and that closed the conda environment.

I now got a new error with ingest.py:

LookupError: 

Resource punkt not found.
Please use the NLTK Downloader to obtain the resource:

import nltk
nltk.download('punkt')

For more information see: https://www.nltk.org/data.html

Attempted to load tokenizers/punkt/PY3/english.pickle

I opened the nltk link in the error message. That's where I stopped for now. Remember to restart the conda virtual environment called privategpt when you pick this up again!

Ubuntu tutorials

My NVidia GPU was installed by default and Ollama detected it, but you may need to install the driver.

I tried installing a few lightweight apps with GUIs in WSL. Here are some more to try.