You can also make another motor on port M2Īdafruit_DCMotor *driveMotor = AFMS. In this case, M1Īdafruit_DCMotor *steeringMotor = AFMS.getMotor(1) #include "utility/Adafruit_MS_PWMServoDriver.h"Īdafruit_MotorShield AFMS = Adafruit_MotorShield() #if not defined ( VARIANT_ARDUINO_DUE_X) & not defined ( VARIANT_ARDUINO_ZERO) I am a novice coder at best and have used the Controller example from the BlueFruitLE nRF51 Library ( Controller | Bluefruit LE Connect for iOS and Android | Adafruit Learning System) to base my controller code off. The response time suddenly becomes extremely slow, taking up to a minute at times to recognize that I have let go of one of the buttons. I have been able to write programs for each unit independently but the problem comes when I try to control the motors using my iphone and the adafruit app through the LE SPI Friend. I am trying to control these two motors with the Bluefruit LE SPI Friend. I have a v2.3 Motor Shield connecting two 9v DC motors through M1 and M4. I don't want to highjack your thread so I'll post the rest elsewhere, but thought it might be of interest to you or others work on the Blocky example.I have done research and not been able to find much on the specifics of my problem. > char-write-req 0x0016 01Ĭharacteristic value was written successfully You can read and write to the device as such: You can connect to a BLE device and get the characteristics from it and see which is accesible or not by trial and error. The LGE Device if from my TV and the HC-05 is a Velleman VMA302 HC-05 device I got from Fry's I do this from a Raspberry Pi or a BeagleBone Black However, if you are looking for a non APP way to collect data from the BLE/Bluetooth device, BlueZ can be run from command line and allows you to gather data from a BT device as well as send commands to it. I believe someone asked about the SPIN code in another thread, but I have been working with a C version which I will post if folks are interested. When I get some free time, I'll post some Spin code from my experiments in the Propeller 1 forum. We didn't get any sleep, but pulled it off - now we're doing a proper development cycle. Luckily, we had good controller (our HC-8+), some Bluetooth modules from an earlier experiment, and a Bluetooth framework for AI2 that I had used in the past to control my DEF CON 22 badge. Your pinouts are Hardware SPI, CS 8, IRQ. You can use this with Atmega328 (Arduino UNO or compatible), ATmega32u4 (Arduino Leonardo, compatible) or ATSAMD21 (Arduino Zero, compatible) and possibly others. John B and I were actually contacted by a friend of our client who asked us to produce a working device THE NEXT DAY (we had less than 24 hours to solve a problem for them that their internal engineering department had failed to complete in a month). There's a few products under the Bluefruit name: If you are using the Bluefruit LE Shield then you have an SPI-connected NRF51822 module. I'm working through some online classes in PhoneGap hoping that I can do what we need for the customer without us having to hire an iOS developer. Luckily, most BLTE devices seen seem to have a custom service that supports serial pass-through, even if it's in small chunks (the HM-20, for example, can send up to 20 bytes I don't yet know the limit on the Adafruit module). The reason for the move to BTLE is that my customer wants iPhone support and iOS phones only support BTLE. In the past I have used MIT App Inventor 2 to create simple Android apps that used standard BT serial. With just a few commands it's easy to convert the incoming string to uppercase and then use strcomp() to test - that's what I'm doing in Spin (I don't know if Blockly has a "no data available" value like FDS does). I have also used the UART section to send simple commands to a project. For the moment (as I'm still in R&D mode), I am using the Bluefruit LE app as it has several interfaces to choose from in the controller section of the app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |