Go to file
2024-10-19 05:05:34 +03:00
apply_stimulation explain 2024-10-19 05:05:34 +03:00
dataset add MNIST dataset, now without tensorflow dep 2024-10-17 18:30:12 +03:00
.gitignore mnist stuff 2024-10-17 18:19:47 +03:00
decode_serial_digit.py viszualizers and digital output 2024-10-19 00:16:28 +03:00
gen_stimulat.py mcu 2024-10-17 19:24:48 +03:00
list_all_nines.py add MNIST dataset, now without tensorflow dep 2024-10-17 18:30:12 +03:00
README.md explain 2024-10-19 05:05:34 +03:00
stimulation_pattern.h viszualizers and digital output 2024-10-19 00:16:28 +03:00
visualize_digit.py viszualizers and digital output 2024-10-19 00:16:28 +03:00

Arduino CLI Installation Instructions

Windows

To install Arduino CLI on Windows using Scoop:

scoop install arduino-cli

Linux

To install Arduino CLI on Linux:

curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh

Usage

After installation, you can use Arduino CLI to compile and upload sketches to your Arduino board. For example:

arduino-cli compile --fqbn arduino:avr:nano:cpu=atmega328old your_sketch.ino
arduino-cli upload -p COMx --fqbn arduino:avr:nano:cpu=atmega328old your_sketch.ino

Replace COMx with the appropriate port for your Arduino board (e.g., COM20).

Project Goal

The goal of this project is to create a system that generates and applies stimulation patterns based on MNIST handwritten digits to a special sample of nano fibers. These nano fibers act as a reservoir, essentially functioning as a small "mind" or computing system. This setup aims to explore the potential of reservoir computing using nano fibers for pattern recognition and information processing.

The project workflow is as follows:

  1. Generate a stimulation pattern from MNIST data (gen_stimulat.py)
  2. Upload this pattern to an Arduino board (using Arduino CLI)
  3. The Arduino applies the stimulation pattern to the nano fiber sample (apply_stimulation.ino)
  4. Receive and decode the response data from the nano fiber reservoir (decode_serial_digit.py)
  5. Visualize the received data to interpret the reservoir's response (visualize_digit.py)

This setup allows for experimenting with how nano fiber reservoirs can process and potentially recognize complex patterns like handwritten digits, exploring the intersection of materials science and neuromorphic computing.

Python Scripts

This project includes several Python scripts for working with MNIST digit data and Arduino communication. Here's a brief overview of each script:

decode_serial_digit.py

This script reads data from a serial port (default: COM20), expecting to receive response values from the nano fiber reservoir after stimulation. It then plots the received data using matplotlib.

Usage:

python decode_serial_digit.py

gen_stimulat.py

This script generates a stimulation pattern from the MNIST dataset. It reads the training images and labels, selects the first occurrence of the digit '9', and converts its pixel values to a stimulation pattern. The pattern is then written to a C header file (stimulation_pattern.h) for use with Arduino.

Usage:

python gen_stimulat.py

list_all_nines.py

This script reads the MNIST training labels and identifies all occurrences of the digit '9'. It prints the total count of '9's in the training set and the first 10 indices where '9' appears.

Usage:

python list_all_nines.py

visualize_digit.py

This script provides a function to visualize a digit pattern using ASCII characters. It can be used to visualize both input stimulation patterns and the reservoir's response.

Usage:

python visualize_digit.py

These scripts work together to process MNIST data, generate stimulation patterns, and visualize the results of the nano fiber reservoir's computations. They are designed to be used in conjunction with the Arduino sketch for controlling the stimulation of the nano fiber sample.