ASCII Art on S1 Console - Sine Graph
1229 1 2019-8-3
Uploading and Loding Picture ...(0/1)
o(^-^)o
MarkusXL
lvl.4
United States
Offline

Just little Python exercise:

Print a graph of the sine function on the S1 Console:

from time import sleep
from math import sin, radians
graph_line = ''
# S1 Console Demo - prints a sine curve with *
for n in range(28, 90):
    circle_1 = 50 * (1 + sin(radians(n * 10)))
    for i in range(int(circle_1)):
        graph_line = graph_line + '*'
    print(graph_line)
    graph_line = ''
    sleep(0.25)



2019-8-3
Use props
DJI Stephen
DJI team
Offline

Hello and good day MarkusXL. Thank you for sharing this information and thank you for your support.
2019-8-4
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules