hm-10 SHIELD assistance command after first pairing - hm-10

hm-10 shild
hello,
did anyone here used HM-10 SHIELD ?
i need a code that after the first pairing any time that the HM-10 SHIELD will identify my ble\phone then the HM-10 SHIELD or the arduino will send a massage or any other command to pc or other
thanks!!!
Reg
MBK

i am new at this tech and i am still learning but i really love to try.
So far I've connected the hm-10 to the Arduino and managed to send some basic commands to it. I'm looking for a code that will help me understand how to use it for proximity (when a device is connected or near the BT range)
thanks !
MBK

Related

STm32 and GPS module

Can anyone please explain how to establish a communication between stm32 dev board and gps module? I am not knowing how to send AT commands to gps module through MC through a source file through UART. Please clarify me in this aspect.
There is a lot of literature on STM32 and UARTs on the web. If I were you I would download the STM32CubeMX. This program generates most of the code for you. You select your processor (or development board), select the clocks and peripherals, and click Generate Code. It also comes with very handy example projects, and might even have a complete project with a working UART that you can put straight onto your board.
And I would first make sure my UART is fully working before connecting the GPS. This you can do by trying to echo. Connect your TX and RX pins with a wire. Then, everything you transmit you will receive as well. It's a easy test to see if everything is working.
I would also work through the TrueStudio IDE. It basically works plug and play
If you use the ublox module, you must use a serial port to communicate.
You have to connect RXD(ublox) to TXD(micro) and TXD(Ublox) to RXD(micro) ,
and config your StmCubemx like This :
http://wiki.sunfounder.cc/index.php?title=Ublox_NEO-6M_GPS_Module
Config Stm32 :
[Step 1: https://i.stack.imgur.com/1B4Ed.jpg ]
[Step 2: https://i.stack.imgur.com/6ULOm.jpg]
[Step 3: https://i.stack.imgur.com/GD0VL.jpg]
If you have another question, please ask
First of all, I think you should test AT command with module sim through (USB to UART) to PC in order to understand procedure operation, such as: module sim - TCP/IP - thingspeak server. The next time, you can refer this link for code: https://bitbucket.org/mbari_peter/sim800-mqtt-ravi/src/78e36076c89b4618cf57a538f0c70f91b2b876dd/modemDrivers.ino?at=master&fileviewer=file-view-default
If you have any questions or encounter any problems, you can ask! Thanks for reading!
Typically, GPS sends data # 1 Hz after starting up. You just need to capture this NMEA sentences and filter the receive buffer according to your requirement.
Try using UART receive interrupt. Make sure the baud rate of both GPS module and STM32 are same.

Detecting a 5 volt signal in serial port in vb.net

I am making an internet cafe software that is coin-operated. I want my program to detect 5 volt signal coming from a coin detector in every insertion of coin. However, I've been searching in google trying to find sample codes to do this but to no avail. Pinchange event doesn't do the trick since the wire that carries the signal is always connected to a serial port pin and pinchange event is always happening even without inserting a coin in the coin slot. I want to detect only the 5 volt signal that the coin detector sends to serial port in every insertion of coin. Please help me on this.
Thank you and best regards.
I have several projects with similarities to this one. I would recommend using the .NET libraries for reading serial ports. In VB.NET it is something like:
Dim com1 As IO.Ports.SerialPort = Nothing
com1 = My.Computer.Ports.OpenSerialPort("COM1")
Dim serialInput As String = com1.ReadLine()
The problem is the 5v signal. This is super easy to read with an Arduino or Raspberry Pi (the Raspberry Pi might be a better solution for you...RPi Foundation just came out with a new quad-core version...and it only runs like $40 and would have no problem surfing the web) to do the signal sensing.
You can get Arduino compatibles for less than $10 like this one http://www.adafruit.com/product/2000 and then program them to send whatever string you want to the serial port.
Good luck with your project.

Is it possible to test the CAN loopback mode without using oscilloscope?

I am working on the CAN on LPC1857 microcontroller. This is the first time I am working on the CAN driver.
I am right now testing the loopback mode in CAN. I have successfully transmitted the message. This I know because of the values in the status register. But now I need to verify whether I have received the same message at the receiver end. Since I do not have any oscilloscope with me, I wanted to know whether it is possible to check the output at the receiver end using software. I am using LPCxpresso IDE for the coding purpose. If yes, can you please give me a brief idea about how it is done?
Any help is appreciated.
Thanks,
Pavan.

AT command sent to modem from microcontroller is ignored

Please help, I spent hours trying to rootcause the problem.
Setup: MSP430 (F5529 microcontroller), HW UART (USCI_A0) and modem connected (uBlox Leon G100). I am sure the USCI_A0 port works well because if I connect it via USB-to-RS232 to the PC I can see the correct traffic.
A simple
uart_puts(UART_MODEM, "AT+CPWROFF\r");
shall put AT+CPWROFF to the modem. And it probably does but modem does not power off. If I simply connect modem to PC and type "AT+CPWROFF" finished by Enter then the modem powers off.
I also confirmed on the PC console that the "\r" works well - it just returns the carriage, correctly. Tried "\n\r", does not work either. Checked in the modem settings for S3 character and it's 013 (CR or \r).
I have no idea what is wrong. PC-to-modem works well (I can power off the modem), MSP430-to-PC works ok (I can see that the microconroller really puts AT+CPWROFF\r on the UART), but MSP430-to-modem does not work.
I can determine if the modem is turned on or off by looking at the current consumed.
Please, any hints?
OK, issue solved. If you take a look at the detected baudrate on the links I sent, you will notice that with PC the exact baudrate was 9585 (which is 0.14% of sync difference) while with the MCU it is 7862 (which is 2.73% of sync difference). I switched to 4MHz crystal and now have approx 0.23% out of sync. It's really wondering that the DCO gives so unstable clock.

Catch Data from a barcode scanner connected via Ethernet

I have a vb.net application that needs to catch the readings from a barcode scanner in a TextBox.
As far as I know, the scanners work sending the data as keystrokes, but I dont know if that still applies when it's connected via Ethernet cable
Well, to get to the point, will the scanner send the data automatically to the textbox? or it will be necesary to work with sockets to handle the readings? and in that case, can some please point me in the right direction.
Thanks in advance.
-x-
In case you ask, the scanner is a COGNEX DATAMAN 500QL
Have you tried downloading the software and drivers from their support site?