Gyro sensor with megapi


#5

I agree, it would be much better to access by readsensor().


#6

Hi Pgchurch,

Do you use the latest version mBlock 3.4.11?
Is it possible to have a video chat with you in order to double check if there is any issue on the Me Gyro Sensor?
If it is okay, please kindly add my Skype account (1021306172@qq.com), we are available from 9:00~18:30 on working day,China time. Please kindly let us know your available time.


#7

Hello. I use Makeblock 3.4.11.
I am sorry, but it is not convenient for me to use Skype to contact you. Is there an alternative?
I believe, simply, that the sensor supplied in the Ultimate kit may be defective as I am sure I have tested it according to your instructions.
Regards,


#8

Hi Pgchurch,

How about taking a video to record your operations during test (include the upgrade firmware and running the code to test the gyro sensor)? Thanks!


#9

Ok, I will make a video and post it to you.


#10

But really, this is a lot of work.
I used the app to upgrade the firmware , there is only one way and megapi was the selected device, and followed your instructions to test the gyro. Is there another way to upgrade the firmware?
If not, what else could be an issue? I hate the idea of spending an hour to send you a video that confirms what I have been telling you all along.
But if you simply have to have a video, let me know.


#11

Hi Pgchurch,

Actually, some problems may not easy to be found by listening to the word description but may be found easily by watching a video. I have met such situation for several times. From your description, everything is normal, maybe the Gyro sensor is faulty but in order to double confirm and be responsible for the conclusion, a video helps a lot. That’s why I want to video chat or get a video.

But if you are very sure you have done everything correctly and feel trouble to send the video, please let me know where did you buy the Gyro sensor and send the receipt to daisy@makeblock.com, thanks!


#12

I will send you a video as I am sure it is hard to diagnose the problem otherwise.


#13

Hi rdhelli,

Sorry for the late response on this problem.
We have provided feedback of your request to our engineers, since the application of using MegaPi with Raspberry Pi is belong to high-end application for advanced players, we can only provide limited support.

The Python library for MegaPi is only for reference, its content may not always correct when there is update of the MegaPi firmware, users can modify the program to use it. While for current problem on using the Gyro, our engineer agree to make some modification to make it match with the the MegaPi firmware recently. You can also use the MegaPi firmware below and modify the Python code for Gyro part refer to fergerberg’s experience in this post.


#14

Hi Pgchurch,

Thanks! We will wait for it.


#15

Ok, hello.
I made a video and whatever I did here, the gyro worked. It seems that it works if I follow this sequence:
Turn on megapi power
Connect usb
Run mblock app
Connect serial port
Load and run program.

If I quit mblock and come back, leaving the Usb cable connected, it does not work.

So I am confused. Do I need to start fresh with the above steps each session?

I cannot upload the video at the moment as it is an unsupported format (mov).


#16

Hi Pgchurch,

You can send the video via the large file transfer website pCloud transfer. You can send it to email address Daisy@makeblock.com

Here I tested the same steps you described and it works, but I am not sure if all my steps are same with yours. So I look forward to your videos.
Please note: the Gyro sensor doesn’t support hot plug. So it is better to plug the gyro sensor to the MegaPi first before connecting MegaPi to Computer and Powering on the MegaPi.


#17

Hi rdhelli,

The instruction of Python for MegaPi has been updated on the Github website.


#18

Thank you for your patient support. I believe the problem is solved.


#19

Thanks a lot for the update, it looks as expected! :grin:

But I would also need the changed/updated megapi firmware that you used for testing, as the current one cannot handle the updated python gyro function. I couldn’t locate a new version in the official github, I am looking for a one, in which these gyro parts are also changed:

MeGyro gyro_ext(0,0x68);           //external gryo sensor
...

void readSensor(uint8_t device)
{
...

case  GYRO:
  {
    uint8_t axis = readBuffer(7);
    if((port == 0) && (gyro_ext.getDevAddr() == 0x68))      //extern gyro
    {
      value = gyro_ext.getAngle(axis);
      sendFloat(value);
    }
    else
    {
      sendFloat(0);
    }
  }
  break;
...
}

Could you please tell if an update is expected soon? I could start editing my own version, but it is a nuisance that I would avoid if possible… (having to compare with any new versions, and possibly messing things up when porting my fixes)

Thanks


#20

Hi rdhelli,

During our test, we use the Firmware for MegaPi showed the picture in my previous reply to you.
If you have other concern about this topic, you can contact our engineer in this post directly.


#21

As I mentioned in readme
PythonForMegaPi, you can just download https://github.com/Makeblock-official/Makeblock-Libraries/archive/master.zip, and the firmware for megapi is in example as shown in the picture.

Since I have received some suggestions in
http://forum.makeblock.com/t/megapi-firmware-python-interface/6776/11, I will update a new version next week, I will be happy to fix some known bugs in this version, You can use it follow the instructionse, if you found some bugs,you can be submitted it on github


#22

One additional question. It seems the makeblock android app (3.1.2.1) doesn’t have access to the gyro sensor. Under ‘detect’, there is no block to read input from the gyro sensor. Would it be possible to include it?
Thanks


#23

Hi rdhelli,

We have shared your request to our Makeblock APP team, they will consider your requirement.


#24