Skip to content

Commit

Permalink
Resolve Review Notes: Misc
Browse files Browse the repository at this point in the history
* gitignore all .pyc files
* misc code formatting
* remove extra/unused imports
  • Loading branch information
acbuynak committed Apr 8, 2022
1 parent d86b691 commit 24a4c52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

scripts/__pycache__/
*.pyc
24 changes: 9 additions & 15 deletions scripts/py_to_ino_RGB_LED_test.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
#!/usr/bin/env python3

# Importing Libraries
# For Arduino Communication:
# https://create.arduino.cc/projecthub/ansh2919/serial-communication-between-python-and-arduino-e7cce0

# import serial
# Refer to pyserial docs: https://pyserial.readthedocs.io/en/latest/pyserial.html
# python3 -m pip install pyserial
# import time
import numpy as np
import rospy


# ROS Data Types

# Custom Script
import image_inputs as input_image
import light_painting.msg #custom message type
import RGBState
from light_painting.msg import RGBState #custom message type


# arduino = serial.Serial(port='/dev/ttyACM0',baudrate=9600,timeout=0.1)
# Code from: https://www.electronicshub.org/controlling-arduino-led-python/
#######################
## Support Functions ##
#######################

def RGB(red,green,blue):

Expand All @@ -30,7 +20,6 @@ def RGB(red,green,blue):
arduino.write(blue)
print('RGB should be on')


def RGB_values(rgb_img):
''' Testing reading values from RGB
Expand Down Expand Up @@ -65,6 +54,11 @@ def RGB_values(rgb_img):
pub_rgb_values.publish(msg)



##########
## Main ##
##########

def main():
rgb_img = input_image.RGB
RGB_values(rgb_img)
Expand Down
Binary file removed scripts/robot_control.pyc
Binary file not shown.

0 comments on commit 24a4c52

Please sign in to comment.