Saltar la navegación

3.4.4.2 Session: Integration and Testing

90 minutes ⇒ Level: High


Connecting Raspberry Pi with Smart Contract (60 minutes)

  • Explain the session's primary goal: to integrate all components into a functioning system.
  • Assist students with setting up the project folder structure and creating the main program, explaining how various processes (OctoPrint server, local blockchain network, main and user programs) will run simultaneously.
  • Remind students to keep the local blockchain network, established in a previous module with a deployed smart contract, running.
  • Guide students through installing Ethers.js on the Raspberry Pi using Node.js and the npm package manager.
  • Remind students to retrieve the account address from a hardhat node and use it with Ethers.js to define an account.
  • Encourage students to develop functions for interacting with the smart contract, both to modify and read data, offering help and debugging guidelines as needed.
  • After establishing smart contract communication, direct students to create decision processes that link smart contract state changes to the 3D printing process, including the use of previously implemented 3D print functions and correct path definitions for G-code files.


Testing of the Implemented System (30 minutes)

  • Encourage students to develop test programs after system integration, preparing scenarios to demonstrate the system's alignment with initial design goals.
  • Dedicate time for identifying and resolving testing issues, and providing support for error debugging.
  • Motivate students to perform a complete end-to-end test, from blockchain transactions to physical printing, ensuring all groups have access to 3D printers if they are limited.
  • Upon successful completion of basic testing, urge students to enhance their system with extra features, potentially improving decision-making algorithms or smart contract capabilities.

Creado con eXeLearning (Ventana nueva)