How to use ad7490 with android things? - raspberry-pi3

How to use ad7490 ADC in Android Things?
I have a sensor 16x16 Sensor Matrix. For this sensor matrix i want to read data of the each cell and position. I want to implement ad7490 ADC with the help of SPI and GPIO Pins connection.
My requirement is, how to read ad7490 A2D value on SPI pin.
Note : I had also implemented this on arduino uno using ic 7495 shift register and 74hc4067 mux. By these i am able to generate 16x16 matrix and read Analog data of each position. Now i want to implement same thing in android things with ad7490

Related

PIC24F issues reading analog AC microphone values

I am using a PIC24FJ128GA010 to read the microphone values. When I read the raw values from the sensor I am getting like 270 but over time the value will go down to 90 and stop. 3.3V is being used and when noise is made the values will change even when its slowly going down to 90. I am not sure why this is the case. I just have 3.3V, ground and an analog input pin connected to the microphone. The microphone I believe picks up noise from -1.7V to 1.7V.
I am setting AD1CON2 = 0x0000; where AVss and AVdd is used as Vref.
Is there a way I can fix the readings from the microphone to display 90 right away? I know that 90 represents 0 and probably will need to fix that so the values would be read just on the positive side. Would using a capacitor help fix this issue?
I am very new to programming microcontrollers and would appreciate any help.

How to read temperature from ZTNQ-7020 Development Board?

I have a small assignment that consists of reading the luminance from a sensor (GND, VCC, sig).
How can I connect the cables into the board? What constraints file should I have?
Has anybody found any example?
Thank you!
Here are the images of the board and sensor:
board
sensor
The XADC is component number 14 in the image below.
Diagraman
So, I connected the sensor's pins to the board's pins(GND, VCC, sig).
After that, I created a module file and I configured the constraints file to map the AD14 pin.

how to control servo motor using embedded c using simple code?

i'm working on a school project "automatic railway system"
my project suppose to close the gate when the train coming to the station with a buzzer on with 90 sec count down display on 7-seg. and a led flashing.
after the train leaving the station, the gate opens and the buzzer off and the led off .
i tried to use a dc motor to open and close the gate but it didn't give me the accurate angle that i need to i try to use a servo motor .
so i need it to open the gate at position zero and close it at position 90 .
all the code i found on the internet they using PWM and timers which i didn't take it in my course , so can anyone help me to do this with simple code ,please ?
i'm using Atmega32 running at 16000000 HZ
Its depend on your analog servo (which is controlled by PWM) frequency specification. After you learn about the servo specification, you can set your PWM using build-in features on cvavr compiler, or you can do some research about PWM registers.
Here is some example of PWM setup
//using OC0 (B.3)
DDRB.3 = 1; //set B.3 as output
TCCR0=0b0111 0001;
TCNT0=0; //set to Phase Correct PWM mode, no prescaler, and inverted output
//to assign a value to your PWM
OCR0 = 127 //50% duty cycle since it was 8 bit

Is NodeMCU's PWM limited to one frequency?

In the NodeMCU doc, it appears PWM on a pin may be set one of two ways, either through PWM or GPIO.
In the PWM doc it says that if you set PWM on one pin for a certain frequency then that frequency is set for all other pins using PWM. This means that you don't have RGB but rather 50 shades of grey.
The GPIO section does not mention this limitation. Is it on place? Is there only one timer on the chip itself available for PWM?
You seem to be confusing the effects of Frequency and Duty cycle on an RGB led, you will have 3 pins connected on which you generate a PWM, where you can set the duty cycle to change the intensity, whether all those frequencies are the same or not doesn't matter.

Pcl object reconstruction

I have a square table with four cameras (Xtion pro), one at each angle.
I'm trying to reconstruct the complete point-cloud of an arbitrary object that is on the table.
I've calibrated the cameras. Intrinsic parameters with a chessboard, and estrinsic parameters with a tag like ARToolkit.
The problem is that when I transform the point-clouds from camera's frame to the tag-defined frame I have errors, quite big.
How can I correct this error? I tried registration with ICP with poor results.
How can I use the obtained transformed cloud as initial guess for a fine registration?
Any suggestion is appreciated!
Edit after D.J.Duff comment:
I'm using Xtion PRO version without the RGB camera. So I'm calibrating the IR camera. To do so I covered the IR projector and performed the calibration with the IR stream with the ready to use ROS calibration tool for intrinsic parameters and the PiTag tags to calibrate extrinsic parameters.
I should manually align the cloud with a known object, but can this be automated? In sense: if I use something like an L-shaped object with no orientation ambiguities, can I automate the registration process to obtain a better transform matrix?

Resources