Psychopy, Python and Arduino (using serial communication) - Introduction (Video 0)
Автор: garrea01
Загружено: 2019-06-05
Просмотров: 846
Описание:
In this series we will journey into hardware control and combine our Psychopy (python) programming with arduino micro-controllers. As usual we have an experiment that we want to build. In this case, we want to be able to turn on and off ultra-bright LED lights and change the illumination of our behavioural arena.
Learning how to control hardware devices (even simple ones light LED lights or sensors) will increase your ability to design and monitor complex experiments. We will eventually use the serial library (from python) to send serial commands (or serial communication) between the python program and our microcontroller. In order for these serial commands to ‘make sense’ to the arduino, we will also need to generate and upload a program onto the arduino itself.
To follow along with these experiments, you will need an arduino (I will be using an arduino UNO) but any compatible arduino with digital pins should work fine. Our programs here will use LED lights to turn on and off, so we should have a couple of those (at least 2 would be good). If you’re really ambitious you should also get some ~270ohm resistors (¼ watt should be fine) to limit current to our LED. If you don’t have these, then you can go without (but be very careful) for these videos (I recommend using resistors).
You will also need to download the Arduino IDE (see site below) which is open source, as well as Python3 with the serial library. We will go through the python libraries in a future video.
Disclaimer.
This is not designed to be a complete python programming course, however it will be necessary to touch on different aspects of python programming as we learn to communicate using serial ports and serial interfaces.
Software used in these videos
Arduino IDE (for Windows/ OSX Linux): http://arduino.cc
Python (for windows) : http://python.org
Psychopy: http://psychopy.org
Atom Editor: http://atom.io
I hope these videos are helpful.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: