Android emulators can simulate Camera device (see screenshot)
For example I can test how my video recording module works:
What about iOS-Simulators? When I try to run my app which uses camera I get the next error
Thread 5: Fatal error: Unexpectedly found nil while unwrapping an Optional value
at line
let videoDeviceInput = try AVCaptureDeviceInput(device: defaultVideoDevice!)
so no simulated devices are available for iOS-Simulators?
According to Apple documentation, using camera with Simulator is not supported:
The following hardware is not supported in Simulator:
Ambient light sensor
Audio input, except for using Siri by choosing Hardware > Siri.
Barometer
Bluetooth
Camera
Motion support (accelerometer and gyroscope)
Proximity sensor
There is one known workaround which could be useful sometimes: https://github.com/YuigaWada/iCimulator
But it does not work with 3-rd party libs like WebRTC though...
Hello Good People of the Internet!
First time asking...
I have a modern PC running Fedora 24 with a real-time patch (CCRMA audio tools) with an ASUS Essence STX II sterio sound card installed on PCIe. With it we run a playback/capture application. Also, we need to integrate CAN and BLE into the system and have a PCIe-card for each of these functions. The CAN PCIe card is from PEAK and the BLE card is an Intel 8260 M2 card that HP have put on a PCIe card (AFAIK).
With only the audio card installed it works fine (using ALSA as API). When the CAN and BLE is installed the following is observed:
Playback works as before.
One capture channel only returns zero (0) or minus one (-1) in all samples.
The other capture channel returns values in the range -2..2 and when applying our application signal processing low quality, but detectable, expected results are presented.
The ALSA API report no problems in setup and configuration.
CAN and BLE functions as expected.
Without any deeper PCIe experience I suspect that CAN and/or BLE PCIe cards jumble the mapping of the sound card functions.
Can someone:
- Tell me if my hunch is in the ballpark?
- Inform me on where I might go for information on how to rectify the problem?
- ...or, share a solution?
Thanks!
I noticed two blocks in InvenSense SensorStudio which appear to be very similar. hey are AuxillarySensorDesign (driver) and CustomSensorDesigner block. What is the difference between the two?
AuxilliarySenorDesigner
Connect to device block (and not to sensor block)
Does not support emulation
Must be used to create driver sensors that get data from hardware (I2C)
CustomSensorDesigner
Connect to one or several sensors block
Support emulation
Should be used to create virtual sensors that gets data from other sensors in the system and apply some algorithm
CustomSensor
Connect to device block
Used to retrieve sensor data from custom sensors from the device (after flashing a firmware)
Refer to "3.6. DESIGN YOUR SENSOR ALGORITHM", "3.7. SENSOR FRAMEWORK EXPLAINED" and "3.8. DESIGN YOUR SENSOR DRIVER" of 001 - SensorStudio User Documentation.pdf available with your SensorStudio installation
I have the CC2540 Keyfob Development Kit and I have established connections between the bluetooth dongle and the Keyfob and have been able to do simple read writes. Then I connected the CC Debugger and download the SmartRF Flash Programmer and the IAR Workbench. All I want to do is change a few values in the firmware so that it broadcasts indefinitely and so that I can change the name it advertises with. I have read the Getting started docs and the sample applications docs but the problem is I don't know how to edit/compile these files so I can upload it to the device with the SmartRF flash programmer. Is there any documents or tutorials or are there steps to do this? Thank you! Let me know if I can answer any other questions
All you have to do is:
Download the BLE stack from Texas Instruments website:
http://www.ti.com/tool/ble-stack
Then in the stack, open Projects\ble\KeyFob\CC2540DB\KeyFobDemo.eww file.
Programming CC2540 kit requires an IDE named IAR Embedded Workbench. You can download it and get access with 30-days trial:
http://www.iar.com/Products/IAR-Embedded-Workbench/8051/
Then open the project and find the keyfobdemo.c file in the APP folder. From line 200-213 there is a char array named deviceName[], which actually defines the advertising name as "Keyfobdemo". You just have to change that with correct hex values, and the length of the array as well.
Then in line 236, you have to change attDeviceName[] array as well, since this parameter defines the name of your device, when it is in connected state.
I built a robot from a thin client pc (can run Windows CE or Linux) and two servo motors. I put USB ends on the servo motors, so when they are plugged in to the thin client they continuously run. In Linux, how could I set the amount of current or voltage going from the USB ports to the servo motors? Would I be able to run a shell script to set the power of a certain USB port to slow down a motor or stop one? If this cannot be done through software, what is the easiest way to do this through hardware without having to buy too much?
The USB voltage is fixed at a nominal 5 volts and cannot be controlled.
The behavior of USB devices regarding their current draw is well defined in the USB specifications. USB devices are supposed to draw up to 1 unit load (100mA) unless they have negotiated a higher load from the USB host. It's quite likely that the servo motors that you have are going to need to draw higher currents than that, and wouldn't be able to request it without being a USB device and negotiating with the host.
It's also likely, depending on the servo motor that you are trying to control, that you'll need to either provide a PWM signal or an analogue voltage to control motor position. USB hosts are not intended to provide either of these.
Your best options to drive your motor from your PC are:
Get a dedicated USB controller for your servo motor (if one exists)
Make your own, based on a small microprocessor (eg. using an arduino)
Choose a different port on the PC. If available, PC parallel ports can be controlled to provide control for motor drivers.
The answers here seem to say it is a hardware issue, but I think this is a software issue. ASUS has Ai Charge which more then doubles the volts to charging Apple products from a standard 2.0 usb port.
USB 1.0, 2.0 and 3.0 Specs (All at 5 volts) 4 Wires (2 Data and 2
dedicated power)
Voltage Breakdown: USB 1.0 and USB 2.0 = 0.5A or 500 mA = 2.5 watt
USB 3.0 = 0.9A or 900mA = 4.5 watt Wall wart = 1.5A or 1500 mA = 7.5
watt Ai Charge = 1.2A or 1200mA = 6 watt
Ai Charge works on ASUS and non-ASUS motherboards and is a program you can install in Windows.
Personally I HATE Apple so I want to figure out a way to do this 1.2A usb 2.0 output trick for my netbook while running Linux.
I don't believe it is possible to directly manipulate the USB voltages. They are designed to provide a +5V output at all times unless power is diminised with other hubs.
You might be better served posting this question on http://electronics.stackexchange.com
you need to use PWM to control motors speed, to do that you need a micro controller, PIC18F series supports USB communication, there are plenty of code samples available internet how to use USB in PIC18F series, also you need a transistor array or H-Bridge to control mortors from PIC.
The simplest way to communicate is, program a USB serial in PIC18F micro controller, and when you plug that 18F to your computer, it will detect USB serial port, so you can send the commands to serial port to control speeds.
I dont think its possible, and even if it was, consider this: The USB port is not suposed to power motors because you can burn the USB port. USB is limited to 500mA (or there abouts) and any power device like a motor can potentially require more than that.
Another thing is that servos should be driven with constant voltage, and the speed is controlled by timing impulses on the control wire.
http://en.wikipedia.org/wiki/Pulse-width_modulation
You should use a driver (hardware) to power the motor with an external power source.
This is transistor's purpose, or try with a potentiometer