sábado, 28 de agosto de 2021

U-BLOX NINA B302 (ARDUINO BLE 33 SENSE) - AGORA COM COMPONENTE MÓDULO U-BLOX NINA B302

U-BLOX NINA B302 (ARDUINO BLE 33 SENSE) - AGORA COM COMPONENTE MÓDULO U-BLOX NINA B302 - MBed Engine


O objetivo deste BLOG é mostrar como é possível programar o U-BLOX NINA B302 para que possa ter utilizado como o ARDUINO BLE 33 SENSE, mas com um custo reduzido, ou seja, você não precisa colocar todos os sensores.

Para a implementação, foi utilizado a nova versão do Software VISUINO o qual recentemente incluiu o BLE 33 SENSE.

Tenha então acesso por Software aos seguintes sensores/atuadores:

LSM9DS1-9: O LSM9DS1-9chip possui um sensor de aceleração linear digital 3D, um sensor de taxa angular digital 3D e um sensor magnético digital 3D. E é usado para medir a aceleração linear, velocidade angular e força do campo magnético, respectivamente, nos três eixos. A taxa máxima de atualização para o acelerômetro e giroscópio é de 952Hz e até 80 Hz para o magnetômetro.

HTS221: O HTS221 é um sensor ultracompacto para umidade relativa e temperatura. Ele vem com um elemento de sensoriamento e um ASIC de sinal misto (Circuito Integrado Específico de Aplicação) a fim de fornecer informações sobre o ambiente externo através de interfaces seriais digitais.

LPS22HB: O LPS22HB é um sensor de pressão absoluta piezoresistive ultracompacto que funciona como um barômetro de saída digital. O chip vem com um elemento de sensoriamento e uma interface IC que se comunica através da interface I2C ou SPI para a placa Nano.

MP34DT05-A: O MP34DT05-A é um microfone MEMS ultracompacto, de baixa potência, omnidirecional e digital construído com um elemento capacitivo e uma interface IC. O microfone é capaz de detectar ondas acústicas, é fabricado usando um processo especializado de micromaquinação de silício dedicado à produção de sensor de áudio

VISUINO

Visuino é o mais recente software inovador da Mitov Software. Um ambiente de programação visual que permite programar suas placas Arduino. ... Os componentes encontrados no software Visuino representam seus componentes de hardware e você poderá criar e projetar facilmente seus programas usando arrastar e soltar.

http://www.visuino.com/



Dentro do VISUINO, escolha o BLE 33 SENSE


Como podes observar, o módulo já tem a INTERFACE para os sensores do BLE NANO 33 SENSE, basta ligá-los, seguindo o esquema 



Como transferir o programa para o seu U-BLOX NINA B302 ?

Montamos então uma placa com U-BLOX NINA B302 conforme figura abaixo:



O esquema elétrico é este




Algumas características do Kit

-Botão de RESET;
-Botão de BOOTLOADER (W102)
-Plugável no PROTOBOARD;
-Acesso às várias GPIOS.

Pequena 

72mmX21mm


Muito fácil de utilizar.

Use o gravador SEGGER JLINK para gravar o BREAKOUT com módulo U-BLOX NINA B112 e U-BLOX NINA B302, conecte nos pinos do SWCLK (pino 7) e SWDIO (pino 9) do SEGGER JLINK nos pinos  SWDCLK e SWDIO do BREAKOUT (pinos nas laterais, próximo à antena). Não esquecer de ligar os GND do BREAKOUT no GND do SEGGER JTAG, bem como alimentar o BREAKOUT com 3.3V.



Ligue os pinos SWD DIO e CLK ...
...nestes pinos da placa BREAKOUT


Você pode também usar o ST-LINK V2



Com o software da SEGGER, gravei o BOOTLOADER do NINA BLE 33 SENSE.





Conecte na USB o U-BLOX NINA B302 e você verá uma COMM virtual


Aqui tem-se um projeto no VISUINO que manda um Hello!!! a cada 1 segundo pela UART (USB)


Compilando (seja paciente, é baseado no Mbed compiler)


Gravando

Executando



Altere o 
variant.cpp para

#include "Arduino.h" #include "pinDefinitions.h" /* wiring_analog variables definition */ /* Flag to indicate whether the ADC config has been changed from the default one */ bool isAdcConfigChanged = false; /* * Configuration used for all the active ADC channels, it is initialized with the mbed default values * When it is changed, all the ADC channels are reconfigured accordingly */ analogin_config_t adcCurrentConfig = { .resistor_p = NRF_SAADC_RESISTOR_DISABLED, .resistor_n = NRF_SAADC_RESISTOR_DISABLED, .gain = NRF_SAADC_GAIN1_4, .reference = NRF_SAADC_REFERENCE_VDD4, .acq_time = NRF_SAADC_ACQTIME_10US, .mode = NRF_SAADC_MODE_SINGLE_ENDED, .burst = NRF_SAADC_BURST_DISABLED, .pin_p = NRF_SAADC_INPUT_DISABLED, .pin_n = NRF_SAADC_INPUT_DISABLED }; void analogReference(uint8_t mode) { nrf_saadc_reference_t reference = NRF_SAADC_REFERENCE_VDD4; nrf_saadc_gain_t gain = NRF_SAADC_GAIN1_4; if (mode == AR_VDD) { reference = NRF_SAADC_REFERENCE_VDD4; gain = NRF_SAADC_GAIN1_4; } else if (mode == AR_INTERNAL) { reference = NRF_SAADC_REFERENCE_INTERNAL; gain = NRF_SAADC_GAIN1; } else if (mode == AR_INTERNAL1V2) { reference = NRF_SAADC_REFERENCE_INTERNAL; gain = NRF_SAADC_GAIN1_2; } else if (mode == AR_INTERNAL2V4) { reference = NRF_SAADC_REFERENCE_INTERNAL; gain = NRF_SAADC_GAIN1_4; } adcCurrentConfig.reference = reference; adcCurrentConfig.gain = gain; analogUpdate(); } void analogAcquisitionTime(uint8_t time) { nrf_saadc_acqtime_t acqTime = NRF_SAADC_ACQTIME_10US; if (time == AT_3_US) { acqTime = NRF_SAADC_ACQTIME_3US; } else if (time == AT_5_US) { acqTime = NRF_SAADC_ACQTIME_5US; } else if (time == AT_10_US) { acqTime = NRF_SAADC_ACQTIME_10US; } else if (time == AT_15_US) { acqTime = NRF_SAADC_ACQTIME_15US; } else if (time == AT_20_US) { acqTime = NRF_SAADC_ACQTIME_20US; } else if (time == AT_40_US) { acqTime = NRF_SAADC_ACQTIME_40US; } adcCurrentConfig.acq_time = acqTime; analogUpdate(); } AnalogPinDescription g_AAnalogPinDescription[] = { // A0 - A7 { P0_4, NULL }, // A0 { P0_5, NULL }, // A1 { P0_30, NULL }, // A2 { P0_29, NULL }, // A3 { P0_31, NULL }, // A4/SDA { P0_2, NULL }, // A5/SCL { P0_28, NULL }, // A6 { P0_3, NULL } // A7 }; PinDescription g_APinDescription[] = { // D0 - D7 { P1_3, NULL, NULL, NULL }, // D0/TX { P1_10, NULL, NULL, NULL }, // D1/RX { P1_11, NULL, NULL, NULL }, // D2 { P1_12, NULL, NULL, NULL }, // D3 { P1_15, NULL, NULL, NULL }, // D4 { P1_13, NULL, NULL, NULL }, // D5 { P1_14, NULL, NULL, NULL }, // D6 { P0_23, NULL, NULL, NULL }, // D7 // D8 - D13 { P0_21, NULL, NULL, NULL }, // D8 { P0_27, NULL, NULL, NULL }, // D9 { P1_2, NULL, NULL, NULL }, // D10 { P1_1, NULL, NULL, NULL }, // D11/MOSI { P1_8, NULL, NULL, NULL }, // D12/MISO { P0_13, NULL, NULL, NULL }, // D13/SCK/LED // A0 - A7 { P0_4, NULL, NULL, NULL }, // A0 { P0_5, NULL, NULL, NULL }, // A1 { P0_30, NULL, NULL, NULL }, // A2 { P0_29, NULL, NULL, NULL }, // A3 { P0_31, NULL, NULL, NULL }, // A4/SDA { P0_2, NULL, NULL, NULL }, // A5/SCL { P0_28, NULL, NULL, NULL }, // A6 { P0_3, NULL, NULL, NULL }, // A7 // LEDs { P0_24, NULL, NULL, NULL }, // LED R { P0_16, NULL, NULL, NULL }, // LED G { P0_6, NULL, NULL, NULL }, // LED B { P1_9, NULL, NULL, NULL }, // LED PWR { P0_19, NULL, NULL, NULL }, // INT APDS // PDM { P0_17, NULL, NULL, NULL }, // PDM PWR { P0_26, NULL, NULL, NULL }, // PDM CLK { P0_25, NULL, NULL, NULL }, // PDM DIN // Internal I2C { P0_14, NULL, NULL, NULL }, // SDA2 { P0_15, NULL, NULL, NULL }, // SCL2 // Internal I2C { P1_0, NULL, NULL, NULL }, // I2C_PULL { P0_22, NULL, NULL, NULL }, // VDD_ENV_ENABLE // Extras Gpios { P0_23, NULL, NULL, NULL }, //IO47 { P0_21, NULL, NULL, NULL }, //IO48 { P0_20, NULL, NULL, NULL }, //IO50 { P0_7, NULL, NULL, NULL }, //IO45 { P0_12, NULL, NULL, NULL }, //IO46 { P0_11, NULL, NULL, NULL } //IO32 }; extern "C" { unsigned int PINCOUNT_fn() { return (sizeof(g_APinDescription) / sizeof(g_APinDescription[0])); } } #include "nrf_rtc.h" #include "nrf_uarte.h" #include "nrf_uart.h" void initVariant() { // turn power LED on pinMode(LED_PWR, OUTPUT); digitalWrite(LED_PWR, HIGH); // Errata Nano33BLE - I2C pullup is controlled by the SWO pin. // Configure the TRACEMUX to disable routing SWO signal to pin. NRF_CLOCK->TRACECONFIG = 0; // FIXME: bootloader enables interrupt on COMPARE[0], which we don't handle // Disable it here to avoid getting stuck when OVERFLOW irq is triggered nrf_rtc_event_disable(NRF_RTC1, NRF_RTC_INT_COMPARE0_MASK); nrf_rtc_int_disable(NRF_RTC1, NRF_RTC_INT_COMPARE0_MASK); // FIXME: always enable I2C pullup and power @startup // Change for maximum powersave pinMode(PIN_ENABLE_SENSORS_3V3, OUTPUT); pinMode(PIN_ENABLE_I2C_PULLUP, OUTPUT); digitalWrite(PIN_ENABLE_SENSORS_3V3, HIGH); digitalWrite(PIN_ENABLE_I2C_PULLUP, HIGH); // Disable UARTE0 which is initially enabled by the bootloader nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STOPRX); while (!nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_RXTO)) ; NRF_UARTE0->ENABLE = 0; NRF_UART0->ENABLE = 0; NRF_PWM_Type* PWM[] = { NRF_PWM0, NRF_PWM1, NRF_PWM2 #ifdef NRF_PWM3 ,NRF_PWM3 #endif }; for (unsigned int i = 0; i < (sizeof(PWM)/sizeof(PWM[0])); i++) { PWM[i]->ENABLE = 0; PWM[i]->PSEL.OUT[0] = 0xFFFFFFFFUL; } } #ifdef SERIAL_CDC static void utox8(uint32_t val, uint8_t* s) { for (int i = 0; i < 16; i=i+2) { int d = val & 0XF; val = (val >> 4); s[15 - i -1] = d > 9 ? 'A' + d - 10 : '0' + d; s[15 - i] = '\0'; } } uint8_t getUniqueSerialNumber(uint8_t* name) { #define SERIAL_NUMBER_WORD_0 NRF_FICR->DEVICEADDR[1] #define SERIAL_NUMBER_WORD_1 NRF_FICR->DEVICEADDR[0] utox8(SERIAL_NUMBER_WORD_0, &name[0]); utox8(SERIAL_NUMBER_WORD_1, &name[16]); return 32; } void _ontouch1200bps_() { __disable_irq(); NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL_ONLY_RESET; NVIC_SystemReset(); } #endif


Altere o 
Mitov.Boards.Arduino.Nano33.vcomp para e tenha visualmente os GPIO (IO_XX) do módulo U-BLOX NINA B302.

Mitov
//---------------------------------------------------------------------------
  [PersistentCollection( TArduinoNano33BluetoothLEModuleOperations )]
  [ArduinoHelpSuffics( '(Nano 33 BLE Operations)' )]
  [ArduinoDeclaredClass]
  TArduinoNano33BluetoothLEModuleOperation : TArduinoCodePersistent;
//---------------------------------------------------------------------------
  [Name( 'Search Bluetooth Devices' )]
  [CreateName( 'Search Devices' )]
  [ArduinoInclude( 'Mitov_ArduinoNano33_BLE_Scan.h' )]
  [ArduinoClass( 'Mitov::ArduinoNano33ModuleScanBLEOperation' )]
  [ArduinoStart]
  [ParentImage( TArduinoESP32BluetoothLEModuleScanOperation )]
  +TArduinoNano33BluetoothLEModuleScanOperation : TArduinoNano33BluetoothLEModuleOperation

    LocalNameOutputPin : TOWArduinoStringSourcePin
    DeviceNameOutputPin : TOWArduinoStringSourcePin

    [Name( 'MAC Address' )]
    MACAddressOutputPin : TOWArduinoStringSourcePin

    SignalStrengthOutputPin : TOWArduinoIntegerSourcePin
    AppearanceOutputPin : TOWArduinoIntegerSourcePin

    Enabled : Boolean = True

  ;
//---------------------------------------------------------------------------
  [ArduinoDeclarationSectionName( 'BoardDeclarations' )]
  [PersistentCollection( TArduinoNano33BluetoothLERemoteDevices )]
  [ArduinoHelpSuffics( '(Nano 33 BLE Remote Devices)' )]
  [ArduinoDeclaredClass]
  [Name( 'Remote BLE Device' )]
  [CreateName( 'Remote BLE Device' )]
  [ArduinoInclude( 'Mitov_ArduinoNano33_BLE_Client.h' )]
  [ArduinoClass( 'Mitov::ArduinoNano33BluetoothLERemoteDevice' )]
  [ParentImage( TArduinoESP32BluetoothLERemoteDevice )]
  [ArduinoInit]
  [ArduinoLoopBegin]
  +TArduinoNano33BluetoothLERemoteDevice : TArduinoBasicNamedExludePersistent

    OutputPin : TOWArduinoBLEClientSourcePin
    DeviceNameOutputPin : TOWArduinoStringSourcePin

    [Name( 'MAC Address' )]
    MACAddressOutputPin : TOWArduinoStringSourcePin

    [ArduinoTemplateParameterCollectionCount]
    DeviceIDs : TArduinoNano33BluetoothLERemoteDeviceIDs

    [Name( 'BLE Client Serial' )]
    Serial : TArduinoBluetoothUartClient

  ;
//---------------------------------------------------------------------------
  [TArduinoNano33DeviceFoundCallChain]
  TArduinoNano33BluetoothLERemoteDeviceIDs : TArduinoPersistentCollection;
//---------------------------------------------------------------------------
  [ArduinoHelpSuffics( '(Nano 33 BLE Remote Device IDs)' )]
  [PersistentCollection( TArduinoNano33BluetoothLERemoteDeviceIDs )]
  [Name( 'Device' )]
  [CreateName( 'Device' )]
  [ArduinoClass( 'Mitov::ArduinoNano33BluetoothLERemoteDeviceID' )]
  [ArduinoDeclaredClass]
  [ArduinoOwnerTemplateType]
  [ArduinoOwnerReferenceTemplate]
  [ParentImage( TArduinoESP32BluetoothLERemoteDeviceID )]
  +TArduinoNano33BluetoothLERemoteDeviceID : TArduinoCodePersistent

    Name : String = ''
    MACAddress : TArduinoMacAddress
    ServiceUUID  : String = ''

  ;
//---------------------------------------------------------------------------
  [ArduinoPopulatedCallChainParameter( 'BLEDevice &', 'ADevice' )]
  [Name( 'DeviceFound' )]
  TArduinoNano33DeviceFoundCallChainAttribute : ArduinoCallChainCompleteAttribute;
//---------------------------------------------------------------------------
  [ArduinoPopulatedCallChainParameter( 'bool &', 'ANeeds' )]
  [Name( 'NeedsScan' )]
  TArduinoNano33NeedsScanCallChainAttribute : ArduinoCallChainCompleteAttribute;
//---------------------------------------------------------------------------
  [Name( 'Nordic' )]
  [Category( TArduinoCategory )]
  [AlternateCategory( TNordicCategory )]
  [ParentImage( TNordicCategory )]
  TArduinoNordicCategory : TClassCategory;
//---------------------------------------------------------------------------
  [Name( 'Microphone' )]
  [CreateName( 'Microphone' )]
  [ArduinoInclude( 'PDM.h' )]
  [ArduinoInclude( 'Mitov_Nano33Sense_Microphone.h' )]
  [ArduinoClass( 'Mitov::MicrophoneNano33Sense' )]
  [ArduinoStart]
  [ArduinoLoopBegin]
  [ArduinoExcludeUnconnectedAndDefault]
  [ParentImage( TArduinoBasicAnalogMicrophone )]
  [ArduinoTemplateParameter( 'SampleRate', 'Mitov::ConstantProperty<33, uint32_t, 16000 >' )]
  +TArduinoNano33MicrophoneModule : TArduinoEnableShield

    [OWPrimaryPin]
    OutputPin : TOWArduinoAnalogArraySourcePin

    [ArduinoUseBindingCheckSetter( 'UpdateEnabled' )]
    Enabled

    [ValueRange( 1, 4096 )]
    [OWExcludeBindings]
    [ArduinoUseBindingCheckSetter( 'UpdateBufferSize' )]
    BufferSize : Unsigned = 256

    [ValueRange( 0.0, 1.0 )]
    [ArduinoUseBindingCheckSetter( 'UpdateGain' )]
    Gain : Single = 0.078

  ;
//---------------------------------------------------------------------------
  [TArduinoNano33DeviceFoundCallChain]
  [TArduinoNano33NeedsScanCallChain]
  TArduinoNano33BluetoothLERemoteDevices : TArduinoPersistentCollection;
//---------------------------------------------------------------------------
  [TArduinoNano33NeedsScanCallChain]
  [TArduinoNano33DeviceFoundCallChain]
  TArduinoNano33BluetoothLEModuleOperations : TArduinoPersistentCollection;
//---------------------------------------------------------------------------
  [ArduinoDeclarationSectionName( 'BoardDeclarations' )]
  [ArduinoDeclaredClass]
  [ArduinoInclude( 'Mitov_ArduinoNano33_BLE_Server.h' )]
  [ArduinoClass( 'Mitov::ArduinoNano33BluetoothLEServer' )]
  [ArduinoExcludeUnconnectedAndDefault]
  [ArduinoInit]
  [ArduinoStart]
//  [ArduinoLoopBegin]
  [ArduinoOwnerTemplateType]
  [ArduinoOwnerReferenceTemplate]
  TArduinoNano33BluetoothLEServer : TArduinoCodeEnabledPersistent

    InputPin : TOWArduinoBLEServerMultiSinkPin

    [Name( 'BLE Server Serial' )]
    Serial : TArduinoBluetoothUartService

  ;
//---------------------------------------------------------------------------
  [ArduinoInclude( 'Mitov_ArduinoNano33_BLE.h' )]
  [ArduinoDeclaredClass]
  [ArduinoClass( 'Mitov::ArduinoNano33BluetoothLE' )]
  [ArduinoInclude( 'ArduinoBLE.h' )]
  [ArduinoDefine( 'VISUINO_BLE_NINA' )]
  [Name( 'Bluetooth Low Energy' )]
  [CreateName( 'Bluetooth' )]
  [ArduinoInit]
  [ArduinoStart]
  [ArduinoLoopBegin]
  [ArduinoExcludeUnconnectedAndDefault]
  [ArduinoVariable( Boolean, 'FScanning' )]
  TArduinoNano33BluetoothExtender : Extender

    [Name( 'MAC Address' )]
    MACAddressOutputPin : TOWArduinoStringSourcePin

    LocalName : String = ''
    DeviceName : String = ''
    Server : TArduinoNano33BluetoothLEServer

    [ComponentEditorEntryDesign( 'Add Remote Devices ...' )]
    RemoteDevices : TArduinoNano33BluetoothLERemoteDevices

    [ArduinoExcludeCollectionItems]
    [ComponentEditorEntryDesign( 'Add BLE Operations ...' )]
    Operations : TArduinoNano33BluetoothLEModuleOperations

  ;
//---------------------------------------------------------------------------
  [CollectionItemAssociation( TOWArduinoBLEServerMultiSinkPin )]
  [ParentImage( TArduinoBluetoothModule )]
  +TArduinoNano33BluetoothModule : TArduinoShield, TArduinoNano33BluetoothExtender;
//---------------------------------------------------------------------------
  [ArduinoI2C( 1 )]
  [ArduinoTemplateParameter( '0_IMPLEMENTATION', 'Mitov::InterfaceI2C<TwoWire, Wire1, Mitov::ConstantProperty<151, uint8_t, 95 > >' )]
  +TArduinoNano33TemperatureHumidityModule : TArduinoTemperatureHumidityHTS221_I2C_Module;
//---------------------------------------------------------------------------
  [ArduinoI2C( 1 )]
  [ArduinoTemplateParameter( '0_IMPLEMENTATION', '  Mitov::Interface_LSM9DS1_I2C<'#13#10'      TwoWire, // 0_I2C_TYPE_PIN'#13#10'      Wire1, // 1_I2C_NAME_PIN'#13#10'      Mitov::NestedProperty<4, Mitov::TArduinoLSM9DS1_I2C_Address<'#13#10'    Mitov::ConstantProperty<3, uint8_t, 107 >, //       AccelerometerGyroscope'#13#10'          Mitov::ConstantProperty<4, uint8_t, 30 > // Compass'#13#10'     > > // Address'#13#10'       >' )]
  +TArduinoNano33OrientationModule : TArduinoLSM9DS1_I2C_Basic_Module;
//---------------------------------------------------------------------------
  [ArduinoI2C( 1 )]
  [ArduinoTemplateParameter( '0_IMPLEMENTATION', 'Mitov::InterfaceI2C<TwoWire, Wire1, Mitov::ConstantProperty<151, uint8_t, 92 > >' )]
  +TArduinoNano33PressureModule : TArduinoLPS22HB_I2C_Module;
//---------------------------------------------------------------------------
  [ArduinoI2C( 1 )]
  [ArduinoTemplateParameter( '0_I2C_TYPE_PIN', 'TwoWire' )]
  [ArduinoTemplateParameter( '1_I2C_NAME_PIN', 'Wire1' )]
  [ArduinoTemplateParameter( 'Address', 'Mitov::ConstantProperty<77, uint8_t, 57 >' )]
  +TArduinoNano33GestureColorProximityModule : TArduinoGestureColorProximityAPDS9960_I2C_Module;
//---------------------------------------------------------------------------
  [ArduinoInclude( 'Mitov_StandardSerial.h' )]
  [ArduinoSerialType( 'arduino::UART' )]
  +TArduinoNano33Serial : TArduinoBasicSpeedSerial;
//---------------------------------------------------------------------------
  [ArduinoInclude( 'Mitov_mbed_BLE33_SPI_Class.h' )]
  [ArduinoClass( 'Mitov::Arduino_BLE33_SPI' )]
  +TArduinoNano33SPI : TArduinoSPI;
//---------------------------------------------------------------------------
  [ArduinoDefine( 'VISUINO_NANO33BLE' )]
  [ArduinoBoardArchitecture( 'mbed' )]
  [ArduinoBoardArchitecture( 'mbed_nano' )]
  [ArduinoBoardCompileParams( 'arduino:mbed_nano:nano33ble' )]
  [Category( TArduinoNordicCategory )]
  [AtduinoCountI2CChannels( 2 )]
  [ArduinoBoardCanReset]
  TArduinoBasicNano33Board : TArduinoBoardExtendableImplementation

    [ArduinoExclude]
    AnalogInputReference : TArduinoAnalogInputReference = Default

    [AddItem( TArduinoEEPROMModule )]
    [AddItem( TArduinoNano33BluetoothModule )]
    [AddItem( TArduinoNano33OrientationModule )]
    Modules : TArduinoModules

    [AddItem( TArduinoNano33Serial, 2 )]
    Serial : TArduinoSerials

    [Name( 'I2C Channels' )]
    [AddItem( TArduinoI2C )]
    I2CChannels : TArduinoI2CChannels

    [Name( 'SPI Channels' )]
    [AddItem( TArduinoNano33SPI )]
    SPIChannels : TArduinoSPIChannels

    [ArduinoBoard_Add_DigitalAnalogChannels( 0,  1, TArduinoAdditionalDigitalPullUpDownSerial1Channel, 'Digital(TX)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 1,  1, TArduinoAdditionalDigitalPullUpDownSerial1Channel, 'Digital(RX)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 2,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_39)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 3,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_21)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 4,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_40)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 5,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_22)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 6,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_41)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 7,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_28)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 8,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_29)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 9,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_44)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 10, 1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_36)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 11, 1, TArduinoAdditionalDigitalPullUpDownPWMSPI0Channel, 'Digital(SPI-MOSI) (IO_35)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 12, 1, TArduinoAdditionalDigitalPullUpDownPWMSPI0Channel, 'Digital(SPI-MISO) (IO_34)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 13, 1, TArduinoAdditionalDigitalPullUpDownPWMSPI0Channel, 'Digital(LED)(SPI-SCK) (IO_31)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 14, 0, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_25)' )]
[ArduinoBoard_Add_DigitalNamedAnalogChannels( 15, 1, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_27)' )]
[ArduinoBoard_Add_DigitalNamedAnalogChannels( 16, 2, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_24)' )]
[ArduinoBoard_Add_DigitalNamedAnalogChannels( 17, 3, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_23)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 18, 4, 1, TArduinoCombinedAnalogDigitalPullDownPWMI2C0Channel, 'Digital(I2C-SDA) (IO_20)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 19, 5, 1, TArduinoCombinedAnalogDigitalPullDownPWMI2C0Channel, 'Digital(I2C-SCL)(IO_18)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 20, 6, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_17)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 21, 7, 1, TArduinoCombinedAnalogDigitalPullDownPWMChannel, '(IO_16)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 22,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_4)  LED R' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 23,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_5)  LED G' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 24,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_43) LED B' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 25,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_33) LED POWER' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 26,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_52) INT_APDS' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 27,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_42) PDMCLK' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 28,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_7)  PDMDIN' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 29,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_51) PDMPWR' )]
[ArduinoBoard_Add_DigitalNamedAnalogChannels( 30, 4, 1, TArduinoCombinedAnalogDigitalPullDownPWMI2C0Channel, 'Digital(I2C1-SDA)(IO_2)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 31, 5, 1, TArduinoCombinedAnalogDigitalPullDownPWMI2C0Channel, 'Digital(I2C1-SCL)(IO_3)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 32,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_8) R_PULLUP' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 33,  1, TArduinoAdditionalDigitalPullUpDownPWMChannel,  'Digital(IO_49) VDD_ENV' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 34,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_47)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 35,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_48)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 36,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_50)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 37,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_45)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 38,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_46)' )]
[ArduinoBoard_Add_DigitalAnalogChannels( 39,   1, TArduinoBasicDigitalPWMChannel, ' Digital(IO_32)' )]
    Digital : TArduinoDigitalChannels

    [ComponentEditorEntryDesign( 'Add S&hields ...' )]
    Shields : TArduinoNanoShields

  ;
//---------------------------------------------------------------------------
  [Name( 'Arduino Nano 33 BLE' )]
  +TArduinoNano33BLE : TArduinoBasicNano33Board;
//---------------------------------------------------------------------------
  [Name( 'Arduino Nano 33 BLE Sense' )]
  +TArduinoNano33BLESense : TArduinoBasicNano33Board

    [AddItem( TArduinoNano33MicrophoneModule )]
    [AddItem( TArduinoNano33TemperatureHumidityModule )]
    [AddItem( TArduinoNano33PressureModule )]
    [AddItem( TArduinoNano33GestureColorProximityModule )]
    Modules

  ;
//---------------------------------------------------------------------------
  [ArduinoSPI( 1 )]
  [ArduinoTemplateParameter( '0_IMPLEMENTATION', 'Mitov::AirLiftShieldInterface' )]
  [ArduinoTemplateParameter_AddToImplementation( '0_SPI_INTERFACE', 'SPI1' )]
  [ArduinoTemplateParameter_AddToImplementation( '1_CHIP_SELECT', '24' )]
  [ArduinoTemplateParameter_AddToImplementation( '1_RESET', '27' )]
  [ArduinoTemplateParameter_AddToImplementation( '1_GPIO0', '26' )]
  [ArduinoTemplateParameter_AddToImplementation( '1_BUSY', '28' )]
  [ArduinoTemplateParameter_AddToImplementation( '2_INVERT_RESET', 'false' )]
  [ArduinoTemplateParameter_AddToImplementation( 'UseGPIO0', 'Mitov::ConstantProperty<43, bool, true >' )]
  [ParentImage( TArduinoAdafruitAirLift_Basic_Module )]
  [Name( 'Communication' )]
  [CreateName( 'Communication' )]
  [ArduinoExcludeUnconnectedAndDefault]
  +TArduinoNano33IOT_AirLiftModule : TArduinoShield, TArduinoAdafruitAirLift_Extender, TArduinoAdafruitAirLiftBLE_Extender;
//---------------------------------------------------------------------------
  [ArduinoI2C( 0 )]
  [ArduinoTemplateParameter( '0_IMPLEMENTATION', 'Mitov::InterfaceI2CNoSetHighBit<TwoWire, Wire, Mitov::ConstantProperty<200, uint8_t, 106 > >' )]
  +TArduinoNano33IOT_OrientationModule : TArduinoAccelerometerGyroscopeLSM6DS3_I2C_Basic_Module;
//---------------------------------------------------------------------------
  [Name( 'Arduino Nano 33 IOT' )]
  [ArduinoBoardCompileParams( 'arduino:samd:nano_33_iot')]
  [Category( TArduinoM0CategoryCategory )]
  [ArduinoDefine( 'VISUINO_MKR_ZERO' )]
  +TArduinoNano33IOT : TArduinoSamdBasic_I2C_Only_Board

    [AddItem( TArduinoNano33IOT_AirLiftModule )]
    [AddItem( TArduinoNano33IOT_OrientationModule )]
    Modules

    [Name( 'SPI Channels' )]
    [AddItem( TArduinoSPI, 2 )]
    SPIChannels : TArduinoSPIChannels
    
    [Name( 'I2S Channels' )]
    [AddItem( TArduinoI2S )]
    I2SChannels : TArduinoI2SChannels

    [ArduinoBoard_Add_DigitalAnalogChannels( 0,  1, TArduinoBasicDigitalSerial1InterruptChannel, 'Digital(TX)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 1,  1, TArduinoBasicDigitalSerial1InterruptChannel, 'Digital(RX)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 2,  2, TArduinoDigitalPWMInterruptChannel )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 4,  1, TArduinoBasicDigitalInterruptChannel )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 5,  2, TArduinoDigitalPWMInterruptChannel )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 7,  2, TArduinoBasicDigitalInterruptChannel )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 9,  2, TArduinoDigitalPWMInterruptChannel )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 11,  1, TArduinoDigitalPWMSPI0InterruptChannel, 'Digital(SPI-MOSI)' )]
    [ArduinoBoard_Add_DigitalAnalogChannels( 12,  1, TArduinoDigitalPWMSPI0InterruptChannel, 'Digital(SPI-MISO)' )]

    [ArduinoBoard_Add_DigitalAnalogChannels( 13,  1, TArduinoDigitalPWMSPI0InterruptChannel, 'Digital(LED)(SPI-SCK)' )]

    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 14, 0, 1, TArduinoCombinedAnalogDigitalAnalogInterruptChannel )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 15, 1, 1, TArduinoCombinedAnalogDigitalAnalogInterruptChannel )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 16, 2, 2, TArduinoCombinedAnalogDigitalAnalogInterruptChannel )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 18, 4, 1, TArduinoCombinedAnalogDigitalAnalogI2C0InterruptChannel, 'Digital(I2C-SDA)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 19, 5, 1, TArduinoCombinedAnalogDigitalAnalogI2C0InterruptChannel, 'Digital(I2C-SCL)' )]
    [ArduinoBoard_Add_DigitalNamedAnalogChannels( 20, 6, 2, TArduinoCombinedAnalogDigitalAnalogInterruptChannel )]

    Digital : TArduinoDigitalChannels

    [ComponentEditorEntryDesign( 'Add S&hields ...' )]
    Shields : TArduinoNanoShields

  ;
//---------------------------------------------------------------------------
; // Mitov

Questões: suporte@smartcore.com.br

FONTES: 


Sobre a SMARTCORE

A SmartCore fornece módulos para comunicação wireless, biometria, conectividade, rastreamento e automação.
Nosso portfólio inclui modem 2G/3G/4G/NB-IoT/Cat.M, satelital, módulos WiFi, Bluetooth, GNSS / GPS, Sigfox, LoRa, leitor de cartão, leitor QR code, mecanismo de impressão, mini-board PC, antena, pigtail, LCD, bateria, repetidor GPS e sensores.
Mais detalhes em www.smartcore.com.br

Nenhum comentário:

Postar um comentário