Hello, VoCore-Friends!
I am just starting with VoCore2 and I don't know nothing about how to use. My goal is to control two stepper motors using the VoCore, but I can't not even understand how a simple "blink led" works. Could someone please help me with some tutorials for getting started?
I will be forever grateful!
Getting started
- Vonger
- Posts: 896
- Joined: Sun Oct 19, 2014 6:00 am
Re: Getting started
Hi,
You can connect LED + pin to any GPIO like GPIO38 and LED - pin to any GND.
call this to export GPIO38
echo 38 > /sys/class/gpio/export
call this to set GPIO38 to output mode
echo out > /sys/class/gpio/gpio38/direction
call this to set GPIO38 value, 1 to turn on LED, 0 to turn off LED.
echo 1 > /sys/class/gpio/gpio38/value
echo 0 > /sys/class/gpio/gpio38/value
VoCore2 GPIO max output current is 8mA(3.3V), so it should be safe to drive most LED, or you can add a resistor to limit the current.
Step motor is just same, normally it will need two GPIO connect to step motor driver board and send the control signal.
You can connect LED + pin to any GPIO like GPIO38 and LED - pin to any GND.
call this to export GPIO38
echo 38 > /sys/class/gpio/export
call this to set GPIO38 to output mode
echo out > /sys/class/gpio/gpio38/direction
call this to set GPIO38 value, 1 to turn on LED, 0 to turn off LED.
echo 1 > /sys/class/gpio/gpio38/value
echo 0 > /sys/class/gpio/gpio38/value
VoCore2 GPIO max output current is 8mA(3.3V), so it should be safe to drive most LED, or you can add a resistor to limit the current.
Step motor is just same, normally it will need two GPIO connect to step motor driver board and send the control signal.
- BryanBarbosa
- Posts: 12
- Joined: Fri May 14, 2021 2:40 am
Re: Getting started
Hi! Thank you very much! Using your instructions I was able to control ports using the terminal, when accessing Vocore 2 by SSH.
I was wondering: is there a practical way to write code in Vocore 2 or send a code written in computer to Vocore 2?
I was wondering: is there a practical way to write code in Vocore 2 or send a code written in computer to Vocore 2?
- Vonger
- Posts: 896
- Joined: Sun Oct 19, 2014 6:00 am
Re: Getting started
I am not sure I understand correctly
You can learn shell script to directly code on VoCore2.
You can learn shell script to directly code on VoCore2.
4 posts
Page 1 of 1
Who is online
Users browsing this forum: No registered users and 83 guests