Vai al contenuto principale
Oggetto:
Oggetto:

PROGRAMMAZIONE AVANZATA: PYTHON E ARDUINO

Oggetto:

ADVANCED PROGRAMMING: PYTHON AND ARDUINO

Oggetto:

Anno accademico 2023/2024

Codice attività didattica
CPS0554
Docenti
Marino Segnan (Titolare dell'insegnamento)
Paolo Castagno
Corso di studio
Corso di laurea magistrale in Comunicazione, ICT e media (Classe LM-59)
Anno
1° anno, 2° anno
Periodo
Secondo semestre
Tipologia
Affine o integrativo
Crediti/Valenza
6
SSD attività didattica
INF/01 - informatica
Erogazione
Tradizionale
Lingua
Italiano
Frequenza
Facoltativa
Tipologia esame
Scritto ed orale
Prerequisiti
Competenze di programmazione di base in linguaggi imperativi o object oriented (C, java, ...). Competenze di informatica generale.
Oggetto:

Sommario insegnamento

Oggetto:

Obiettivi formativi

L' insegnamento e' divisto in due parti: Python (3CFU), Arduino (3CFU)

I parte Python (Prof. Segnan):

L' insegnamento  usa il linguaggio Python per introdurre  principi  e tecniche basilari di programmazione avanzati. I paradigmi prescelti sono: la Programmazione strutturata, funzionale, orientata agli oggetti. L’obiettivo principale e' di rendere in grado allieve ed allievi, dato un problema risolubile tramite una soluzione software di realizzarla tramite i seguenti passi: analisi del problema, progettazione di un algoritmo che risolva il problema,  implementazione dell' algoritmo in Python. Sara' privilegiata la ricerca di una una soluzione efficace anziche' una efficiente.

II parte: Arduino (Prof. Castagno)

L' insegnamento introdurrà' i concetti di Internet and Web of Things e di Smart Object.
Inoltre, l'insegnamento prevede l'utilizzo del linguaggio C per la prototipazione di semplici Smart Objects. La piattaforma utilizzata per la prototipazione e lo sviluppo di progetti in grado di interagire e monitorare l'ambiente circostante e' Arduino.
L'obiettivo principale e' di fornire agli studenti ed alle studentesse le conoscenze minime per lo sviluppo di prototipi di Smart Objects e del controllo di dispositivi analogici e digitali come led, stepper motors, sensori ambientali e display.

 

The course is made of two modules: Python (3CFU) and Arduino (3CFU)

I part: Python (Prof. Segnan)

The course uses the Python language to introduce basic principles and advanced programming techniques. The chosen paradigms are structured, functional, and object-oriented programming. The main objective is to enable the student, given a problem that can be solved by a software solution to implement it through the following steps: problem analysis, design of an algorithm that solves the problem, and implementation of the algorithm in Python. The search for an effective solution rather than an efficient one will be privileged.

 

II part: Arduino (Prof. Castagno)

The course will introduce the concepts of Internet and Web of Things, Smart Objects, and prototyping. The C programming language will be introduced and used to prototype simple Smart Objects. The selected platform for prototyping and development is Arduino.
The main objective is to provide students with the minimum knowledge for developing prototypes of Smart Objects and controlling analog and digital devices such as LEDs, stepper motors, environmental sensors, and displays.

 

Oggetto:

Risultati dell'apprendimento attesi

I parte (Python)

Al termine dell' insegnamento , alunne ed alunni:

  1. padroneggeranno i concetti fondamentali  dei vari paradigmi della programmazione (a oggetti, strutturata, funzionale).
  2. Conosceranno in maniera approfondita le caratteristiche ed i costrutti del linguaggio Python.

Le abilità che saranno acquisite riguardano:

  1. la capacità di modellare un problema tramite i costrutti e le librerie del linguaggio;
  2. la capacità di implementare e collaudare il progetto risultante mediante un ambiente di sviluppo integrato.

II parte (Arduino)

Al termine dell'insegnamento, alunne ed alunni:

  1. Padroneggeranno gli strumenti necessari per prototipare oggetti smart interattivi. In particolare, avranno appreso le basi per controllare dispositivi fisici (display, sensori ed attuatori) sia analogici che digitali.
  2. Avranno anche acquisito una conoscenza di base del linguaggio di programmazione C.

Le abilità che saranno acquisite riguardano la progettazione, l'implementazione e la prototipazione di oggetti capaci di interagire con l'ambiente e con gli utilizzatori.

I part (Python)

At the end of the teaching the student will :

  1. master the fundamental concepts of the various programming paradigms (object-based, structured, functional).
  2. know in depth the features and constructs of the Python language.

The skills that will be acquired concern:

  1. the ability to model a problem through constructs and libraries of language;
  2. the ability to implement and test the resulting project through an integrated development environment.

II part (Arduino)

At the end of the course:

  1. Students will master the tools necessary for prototyping interactive smart objects. Specifically, students will learn how to control physical devices– such as sensors and actuators– both digital and analogical.
  2. Students will learn the basics of C programming language.

Students will acquire the skills required to design, implement and prototype objects capable of interactions with the environment and users.

 

Oggetto:

Programma

I parte (Python)

  • Storia e motivazione del linguaggio
  • Installazione dell'ambiente di programmazione PyCharm
  • Struttura sintattica di un programma
  • I tipi di dati fondamentali del linguaggio
  • espressioni ed operatori logico-matematici
  • i costrutti fondamentali del linguaggio
  • definizione ed uso di funzioni
  • Interazione con lambiente esterno, input ed output, uso dei dati su file
  • Le strutture dati del linguaggio: sequenze, dizionari, insiemi
  • Organizzazione di un programma complesso tramite moduli
  • Definizione di oggetti e classi ideati dal programmatore
  • IAnalisi dei contesti in cui l'uso del linguaggio apporta i maggiori benefici

II parte (arduino)

  • Introduzione a Internet of Things (IOT) e Web of things (WOT)
  • La piattaforma Arduino
  • Il linguaggio di programmazione di Arduino
  • Prototipazione hardware e software con Arduino

I part (Python)

  • History and motivation of language
  • Installing the PyCharm programming environment
  • The syntactic structure of a program
  • The basic data types of the language
  • logical-mathematical expressions and operators
  • the basic constructs of language
  • definition and use of functions
  • Interaction with the external environment, input and output, use of file data
  • Language data structures: sequences, dictionaries, sets
  • Organization of a complex program through modules
  • Definition of objects and classes created by the programmer
  • Analysis of the contexts in which the use of language brings the greatest benefits

II part (Arduino)

  • Introduction to Internet of Things (IOT) and Web of Things (WOT)
  • Arduino platform
  • Arduino programming language
  • Hardware and software prototyping with Arduino

 

Oggetto:

Modalità di insegnamento

l' insegnamento e' diviso in due parti di 18 ore, per un totale di 36 ore.

Prima parte (Python)

Lezioni frontali alternate ad attivita' di esercitazione.

Il materiale didattico sara' caricato sulla piattaforma Moodle poco prima dell'inizio del insegnamento al seguente url:

https://elearning.unito.it/scuolacle/course/view.php?id=4389

Come riferimento temporaneo, si puo' consultare il materiale dell'anno precedente al seguente Url:

https://elearning.unito.it/scuolacle/course/view.php?id=3444

Il materiale consiste di  libri in formato elettronico, cartelle contenenti progetti Software di esempio, presentazioni in formato "Google Slides". Queste ultime contengono, oltre al testo, commenti in formato audio e video illustrativi.

L' alunno segue le lezioni e svolge esercitazioni sul proprio Personal Computer. Il contenuto del materiale sul sito Moodle e' molto simile a quello che viene esposto durante la lezione.  Data la complessita' dei concetti esposti, le parti teoriche si alternano piu' volte in una singola  lezione alle esercitazioni.

Compatibilmente con le limitazioni in vigore per la prevenzione dei contagi, le lezioni si svolgono in presenza altimenti  tramite strumenti di Web Conference.

In entrambi i casi la lezione viene registrata e resa disponibile sul sito Moodle. 

Le pratiche sopra descritte mirano a ridurre il divario fra le opportunita' messe a disposizione fra studenti frequentanti e non frequentanti.

 

II parte (arduino)

Lezioni frontali alternate ad attività di esercitazione.

Il materiale didattico sarà caricato sulla piattaforma Moodle poco prima dell'inizio del insegnamento alla pagina dell'insegnamento.

Il materiale didattico consiste di presentazioni ed esempi di codice utilizzati nel corso delle lezioni frontali o durante le esercitazioni.

The course is split in 2 parts of 18 hours, for a total of 36 hours.

I part (python)

The course material will be available on Moodle shortly before the start of the lessons at the following url:

https://elearning.unito.it/scuolacle/course/view.php?id=4389

For reference purposes, the link to the previous year course follows:

https://elearning.unito.it/scuolacle/course/view.php?id=3444

The material consists of books in electronic format, folders containing sample Software projects, presentations in "Google Slides" format. The latter contain, in addition to the text, explanatory comments in audio and video format.
The student follows the lessons and carries out exercises on his Personal Computer. The content of the material on the Moodle site is very similar to what is presented during the lesson. Given the complexity of the concepts exposed, the theoretical parts alternate several times in a single lesson with exercises.
Compatibly with the limitations in force for the prevention of infections, the lessons are held in the presence of others through Web Conference tools

In both cases the lesson is recorded and made available on the Moodle website.
The practices described above aim to reduce the gap between the opportunities made available between attending and non-attending students.

 

II part (arduino)

The course consists of both theoretical and practical lessons.

The course material will be available on Moodle shortly before the lessons start at course page.l

The material consists of presentations and code snippets.

Students attending the course will carry out exercises on their Personal computers. The material's content on the Moodle site is very similar to what is presented during the lesson. Given the concepts' complexity, the theoretical parts alternate several times in a single lesson with exercises.

 

 

Oggetto:

Modalità di verifica dell'apprendimento

Il voto finale e' la media aritmetica dei voti ottenuti nei due progetti.

I parte (python)

Alunne ad alunni implementeranno il progetto di un semplice programma Python su tema deciso dall'insegnante seguendo le linee guida illustrate durante le esercitazioni.  La valutazione avverra' in base ai seguenti criteri, elencati in ordine di importanza decrescente:

  1. Il programma e' efficace, realizza l'intento dichiarato
  2. Il programma utilizza funzionalita' e costrutti avanzati del linguaggio
  3. Il programma utilizza un algoritmo efficiente, 

E possibile realizzare il progetto in gruppi al massimo di 3, ma si richiede una qualita' del programma proporzionalmente maggiore

 

II parte (arduino)

Alunne ed alunni realizzeranno un prototipo di smart object a loro scelta, da soli o in gruppi di due persone. La prototipazione richiede sia lo sviluppo della logica di controllo e di interazione con l'utente, sia la costruzione di un prototipo utilizzando le schede Arduino fornite durante il corso.
La valutazione avverrà in base ai seguenti criteri, elencati in ordine di importanza decrescente:

  1. Corretto controllo di sensori ed attuatori
  2. Complessità del prototipo
  3. Funzionalità del prototipo

The final grade is the arithmetic mean of the 2 grades obtained in the two projects.

I part (python)

The student will implement the project of a simple Python program on a topic chosen by the student, following the guidelines illustrated during the exercises. The evaluation will be based on the following criteria, listed in order of decreasing importance:
  1. The program is effective, it fulfills the stated intent
  2. The program uses advanced features and constructs of the language
  3. The program uses an efficient algorithm
It is possible to carry out the project in groups of up to 3 people, but a proportionately higher quality of the program is required

 

II part (Arduino)

The students (alone or in groups of two) will design and implement a prototype of a smart object of their choice. The design of a smart object requires students to implement both the control logic and the interaction with the user and build a prototype using the Arduino modules provided. 
The evaluation will be based on the following criteria, listed in order of decreasing importance:

  1. Proper sensors and actuators control
  2. The complexity of the prototype
  3. The functionality of the prototype

 

Oggetto:

Attività di supporto

 
 
 
 
 
 

Testi consigliati e bibliografia

Oggetto:

I parte (python)

Il materiale didattico e' identico per alunni frequentanti e non frequentanti.

libro gratuito scaricabile:

https://github.com/AllenDowney/ThinkPythonItalian/blob/master/thinkpython_italian.pdf

sito di domande e risposte per aiuto su problemi specifici:

https://stackoverflow.com/

 

II parte (arduino)

Documentazione e materiale aggiuntivo e' disponibile in rete al sito www.arduino.cc

 

I part (python)

The teaching material is identical for attending and non-attending students.

Downloadable free book

https://github.com/AllenDowney/ThinkPythonItalian/blob/master/thinkpython_italian.pdf

Q&A website on specific issues:

https://stackoverflow.com/

 

II part (Arduino)

Documentation and additional materials are available online at www.arduino.cc

 

 



Oggetto:

Note

Studenti e studentesse devono essere muniti di un proprio computer, per poter sviluppare il progetto ed esercitarsi fuori dall'orario di laboratorio.

Kit Arduino verranno forniti in laboratorio (oppure sarà possibile usare il simulatore Tinkercad)

 
The students must have a personal  computer, in order to practice and develop the project out of the lesson's time
 
Arduino kits will be provided (in alternative the online Tinkercad simulator will be used)
 
Oggetto:
Ultimo aggiornamento: 20/02/2024 09:52
Non cliccare qui!