- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to read output from the Raspbery Pi to the Psoc (High/Low), Im doing a smart lock through bluetooth using the pi as the bluetooth compoenent. When a verified paired device is recognized i need to the pi to send out a 1 . With a DMM I am able to verify that the Pi puts out a 0,1 because it reads 3V=High and 0V=Low. When I try to read the output from the Pi thorugh an if loop, the psoc does not work.
Any ideas on whats wrong?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does copy and paste work on here?! it wont let me post it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you providing your PSoC with 3.3V?
Please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator -> File -> Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You only read your pinstate at the beginning of the program. Its value is never again changed.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that pin is changed though the pi, when a device is paired i send out a 1 to the psoc. but it doesnt seem to read it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not read the pin again! Follow your program flow, you assign the value from reading the pin only once.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I tried inserting the pin_read() inside the for loop so the state of the pin is being read from the raspberry pi it still did not work. Is there a way I can print out if the pin is actually reading 3V or logic 1 or 0?
I also tried connecting it directly to a 3.3V pin from the pi which should provide a logc 1 but also no luck.
thanks for your input Bob!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should use the debugger to check variables. Set a breakpoint and display (mouse over) your vars.
Reading a pin is such a simple thing, I would suggest using a logic analyzer. Triple check the connections.
Can you provide the actual changed project?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just see: Your bluetooth_pin is configured as output, not as input!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set the drive mode of the bluetooth_pin to "Digital High-Z"
Bob