#How to G-Code Shell Commands
25 messages · Page 1 of 1 (latest)
Thats the python script:
import time
import board
import neopixel
import random
#Initialise two strips variables, provide the GPIO Data Pin
#utilised and the amount of LED Nodes and brightness (0 to 1 value)
pixels1 = neopixel.NeoPixel(board.D10, 39, brightness=1)
num = random.randint(0, 255)
num1 = random.randint(0, 255)
num2 = random.randint(0, 255)
#Focusing on a particular strip, use the command Fill to make it all a single colour
#based on decimal code R, G, B. Number can be anything from 255 - 0. Use a RGB Colour
#Code Chart Website to quickly identify a desired fill colour.
pixels1.fill((num, num1, num2))
Ahoi @cinder rune!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message
What do you mean with "gow to program it"?
And also specify which shell you mean
i have no idea. there are different kinds of shell languages?
I mean which shell. Not the language...
Do you mean the shell thing in Mainsail? Do you mean the ssh shell?
There is a reason whr the this is an unsupported klipper module
there is no mainsail gcode shell comand
but I could with KIAUH
you can install the unofficial and unsupported klipper module gcode_shell
but i was able to do things like echo
you than can use it to start a shell scripts within a klipper macro
yes, but where can i learn the language??
currently you only shared the klipper side telling us that you want execute the following line sh -c "/home/pi/PythonCode/rgb_light/random_rgb_lights.sh"
what languge? you using a shell script. maybe that is a start https://stackoverflow.com/questions/5725296/difference-between-sh-and-bash
honestly saying I am not google!!!
opr https://en.wikipedia.org/wiki/Shell_script or one of the other 1000 hits
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the progra...
so is it not possible to turn my python code in a shell script?
I cannot find any guids how to use the gpio pins and hto controll the rgb-leds
I've tried googling the answer but with no luck.
I need to use my works supercomputer server, but for my python script to run, it must be executed via a shell script.
For example I want job.sh to
takes me a minute to google ...
i also changed the tag from mainsail to klipper, because this post has nothing todo with mainsail...