Compare commits
2 Commits
e43b9585a2
...
3667bb5477
| Author | SHA1 | Date | |
|---|---|---|---|
| 3667bb5477 | |||
| 1c0cdac077 |
@@ -1,5 +1,6 @@
|
|||||||
#include "../include/packet.h"
|
#include "../include/packet.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
|
|
||||||
#define LED_PIN 25
|
#define LED_PIN 25
|
||||||
@@ -8,7 +9,12 @@ int main() {
|
|||||||
gpio_init(LED_PIN);
|
gpio_init(LED_PIN);
|
||||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||||
|
|
||||||
|
stdio_init_all();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
printf("hello!!!\n");
|
||||||
gpio_put(LED_PIN, 1);
|
gpio_put(LED_PIN, 1);
|
||||||
sleep_ms(2000);
|
sleep_ms(2000);
|
||||||
gpio_put(LED_PIN, 0);
|
gpio_put(LED_PIN, 0);
|
||||||
|
|||||||
1
visualizer/.gitignore
vendored
Normal file
1
visualizer/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
network.html
|
||||||
23
visualizer/main.py
Normal file
23
visualizer/main.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
from pyvis.network import Network
|
||||||
|
import pyvis
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
|
||||||
|
pyvis.__version__
|
||||||
|
|
||||||
|
|
||||||
|
def random_colour():
|
||||||
|
return f"rgb({randint(0,255)},{randint(0,255)},{randint(0,255)})"
|
||||||
|
|
||||||
|
def main():
|
||||||
|
net = Network(notebook=False, cdn_resources="remote", neighborhood_highlight=True, bgcolor="#222222", font_color="#FAFAFA")
|
||||||
|
net.repulsion(spring_length=300)
|
||||||
|
|
||||||
|
net.add_nodes([1,2,3,4,5,6,7,8,9,10], label=["1","2","3","4","5","6","7","8","9","10"],color=[random_colour() for _ in range(10)])
|
||||||
|
net.add_edges([(1, 2, 10), (1, 3, 5), (1, 4, 6), (2, 3, 10), (2, 5, 1), (5, 6, 9), (7, 8, 7), (8, 9, 7), (9, 7, 8), (1, 7, 7), (9, 10, 2)])
|
||||||
|
|
||||||
|
net.show("network.html", notebook=False)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user