n1ist wrote: ↑Sun Oct 14, 2018 10:39 am
Some Bluetooth (or WiFi or ZigBee) modules are not intended to be user-programmed; they come preprogrammed with a processor that has a serial interface of some sort, and only intend you to use it as a peripheral. The one you mentioned is in this category. Others (ie. ones based on the Nordic or Silicon Labs Gecko family) are designed to let the user program run on the same processor. They come with an API for interacting with the bluetooth stack and you program these with the software from the module vendor and a programmer. They require more work since the user program has to coexist with the radio stack and interact with it.
I guess I still don't quite get it. For example, take this chip:
At the bottom they show a development board for the chip, which has a button, LED, and Buzzer. For me, it seems like the intention of a board like this would be for a developer to upload programs to so they could turn the LED on when the button is pressed or turn the LED on when a device is connected. With that dev board, how could a connected device respond to a button press? It seems like the only way to trigger an event in a connected device when I click that button is I have to program the chip itself to send a message or something to connected devices whenever that PIO is set HIGH/LOW. But I don't understand how I could hook up my computer to that chip and program it. Is it through UART? SPI? What software do I need on my computer to accomplish this?