Print (sys.argv) # Check we have a filename Tmp = ser.readline().strip('\n') # One of the messages that gets printed we don't care about so we throw it away. Time.sleep(5) # Wait a few moments for the Ctrl D to take effect, it'll print a few messages and start telling us temps. Ser.write(b'\x04') # This mimics the Ctrl D Port='/dev/ttyACM0', # remember earlier we discovered mine is ttyACM0 I tried connecting using python earlier but had no luck, it would just print a newline over and over, which wasn't much help, but here is the thing after seeing that we needed ctrl d to get the temp data, something clicked. Ok so we have data through screen but that doesn't help us if we want to save the data. When you are done with Screen Ctrl A should get you out. If that didn't work, you might need to check the instructions up to this point and make sure you followed them. If it's not it might tell you to hit reset then it'll start running, so do that. If you get connected via screen you should have to hit Ctrl d and it'll start showing temps. This at least got me to the point of making sure I can see the temp. When I ran the ls command above mine returned /dev/ttyACM0 so yours will *likely* do this unless you have other stuff connected, additionally 115200 is the speed with which to communicate. This tells us to use screen (so you might need to apt-get install screen). Then from there we can test out we can see the data. Which we use to find the port our device is communicating over: Now there is a process to view the content on the board not found in the series of steps, instead I came across that here: OK now our board should be outputting temperature data, great. Print("Temperature F:", cp.temperature * 1.8 32) Putting your finger over the sensor to see the numbers change!"""įrom adafruit_circuitplayground import cp It prints the temperature in both C and F to the serial console. I then pushed code.py which contained the following: """This example uses the temperature sensor on the Circuit Playground, located next to the image ofĪ thermometer on the board. Following the instructions ignoring that amounts to updating our board with the circuitpython, once that was on the board we had the following page: So we will start there, you can follow along from the start, but the instructions keep pushing to use the mu editor, which I didn't attempt to do as I wasn't sure how it would actually log data for me. You might have to hit reset to put it back in the mode. Make sure you can see the folder to plop files into. So lets start with, connect your circuit playground express to your raspberry pi. The rest of the search results weren't much better. This one wants us to us a USB to serial device and hook up to the physical serial pins, but we are connected via USB, so I was a bit frustrated. So I tried searching for the above title and well, it gave me this as the top result:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |