Open
Conversation
hah! setting up input capture on PIC, going to test it with signal generator.
didn’t put it main though, just wanted to keep a step ahead
incapt pin - B3 and if TMR1 clk source is instruct clk, then T1OSCEN has to be enabled if TMR1 clk source is Fosc, then T1OSCEN can be disabled
turns out global variable must be used in some type of logic statement for it to be available in Watches in MPLAB X
Josh got Sleep functionality to work. PIC can go to and come out of Sleep mode now.
powers ECCO Pro, gets uPeriod after second pulse in the set (shout out to Josh F. for seeing that bug), sleeps for 8 seconds. Still need to store data in array (velocity and acceleration arrays) and come up with algorithm to compare rates such that lights can turn on accordingly.
this is ready to store data from the sensor, has the algorithm for looking at the 2nd order derivative, last version before migration to 1825.
migrated code from PIC16L1827 to blah-blah-1825. 1825 has 1 KB of memory but also has less pins :-p
removed some comments
implementing things needed for full bluetooth functionality
turns out C0 isn’t an IOC pin - A2 is though.
using interrupt on change instead of ext interrupt, checking IOCIF flag, then doing a secondary check for the pin the button is connected to
turns out can’t really write to TXREG in interrupt or you’ll get trash as well data you wrote out. Instead we set flag, and once it’s set a function in foreground will send out data in a for loop
# of times you iterate thru for loop is now set by how many values there are in moisture array
deleted dead code, made some changes to reflect circuit design changes (i.e using BJT in powering ECCO)
removed Config necessary for old version of MPLAB.
adlkjflds
I winked something such that the other set of LEDs turns on during the while loop not sure what it is. Went to this old version, have to iron out the send data though.
Able to witness value on terminal, need to switch the logic for on / off lights, need to calibrate for wet / dry soil
can detect wet and dry soil, streams number of ticks (moisture) via bluetooth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for 1825, joshuapf